static-typing Questions

1

Solved

I've just watched a video of the Groovy inventor, James Strachan, in which he goes on quite passionately about loving Scala. That caused me to want to find out more about Groovy which lead me...
Oath asked 4/7, 2012 at 18:4

1

Solved

How can I have multiple class constraints, so if A is an Eq and B is a Num, I could say either f :: Eq a => a -> b` or f :: Num b => a -> b So, how can I have Eq a => and Num...
Superannuated asked 19/6, 2012 at 3:3

2

Solved

When I define a function in Common Lisp like this: (defun foo (n) (declare (type fixnum n)) (+ n 42)) I expected a call like (foo "a") to fail right away but it instead fail at the call to +. ...
Alimony asked 1/3, 2012 at 18:11

2

Solved

If I understand correctly Groovy is dynamically typed but since it's almost a superset of Java, static type information may optionally be provided. This could be useful if writing something where o...
Finalist asked 5/9, 2011 at 0:39

2

I was a little surprised when I started using Lift how heavily it uses reflection (or appears to), it was a little unexpected in a statically-typed functional language. My experience with JSP was s...
Lutes asked 5/9, 2011 at 5:3

1

Solved

What's the correct type of a sequence? I have this code: (defrecord MethodInfo [^clojure.lang.ISeq preconds ^clojure.lang.ISeq postconds]) But it doesn't seem to correctly enforce the type requi...
Hyoscyamine asked 17/7, 2011 at 23:25

7

I have this method to transform a List to a Map using one of the properties of the elements of the list: For short it looks like this: private Map<String, List<Diagnostic<? extends Java...
Deathwatch asked 5/7, 2011 at 21:50

5

Solved

I don't have much experience with statically typed languages (currently learning Scala and loving it!) but one thing I've noticed is that they don't ever seem to have anything like Ruby's method_mi...
Recreate asked 24/9, 2010 at 15:28

4

Solved

May be it's a silly question. Is there an alternative to Java and .NET platform? Which: Is a programming language itself. Language ports unless they become dominant are not really successf...
Tosh asked 4/4, 2011 at 10:2

6

Solved

I have read that Scala's type system is weakened by Java interoperability and therefore cannot perform some of the same powers as Haskell's type system. Is this true? Is the weakness because of typ...

6

Solved

Is using float type slower than using double type? I heard that modern Intel and AMD CPUs can do calculations with doubles faster than with floats. What about standard math functions (sqrt, pow, ...
Olivares asked 21/4, 2011 at 1:14

4

Solved

What OOP principles, if any, don't apply or apply differently in a dynamically typed environment as opposed to a statically-typed environment (for example Ruby vs C#)? This is not a call for a Stat...

3

Solved

I used to do a lot of web programming in Rails (PHP before that) before I started studying computer engineering. Since then, I've done a lot of school work in C, and some personal stuff in Object...
Cauchy asked 7/12, 2010 at 17:7

2

Solved

I have read that Scala's type inference is not global so that is why people must place type annotations on the methods. (Would this be "local" type inference?) I only a little understand that the ...
Polygnotus asked 29/11, 2010 at 13:4

12

Solved

I have read that with a statically typed language like Scala or Haskell there is no way to create or provide a Lisp apply function: (apply #'+ (list 1 2 3)) => 6 or maybe (apply #'list '(lis...
Portable asked 12/9, 2010 at 2:3

1

Solved

When I use a foreach loop in C#, it appears that no compile time type checking is performed if the item type is an interface type. E.g. class SomeClass {} interface SomeInterface {} IEnumerable&...
Ramonitaramos asked 2/8, 2010 at 15:42

4

Is a statically-typed full Lisp variant possible? Does it even make sense for something like this to exist? I believe one of a Lisp language's virtues is the simplicity of its definition. Wou...
Howerton asked 24/7, 2010 at 2:17

6

Can you name languages with static type checking (like Java) and where code is data (like in LISP)? I mean both things in one language.
Headstrong asked 18/6, 2010 at 14:18

3

Solved

In my current job I'm building a suite of Perl scripts that depend heavily on objects. (using Perl's bless() on a Hash to get as close to OO as possible) Now, for lack of a better way of putting ...
Solvable asked 29/5, 2010 at 1:50

4

Solved

I am learning functional programming style. In Don't Fear the Monads, Brian Beckman gave a brilliant introduction about Monad. He mentioned that Monad is about composition of functions so as to add...
Fideism asked 27/12, 2008 at 5:51

2

Solved

sqlite uses something that the authors call "Manifest Typing", which basically means that sqlite is dynamically typed: You can store a varchar value in a "int" column if you want to. This is an in...
Detruncate asked 20/5, 2009 at 21:55

5

Solved

In my reading on dynamic and static typing, I keep coming up against the assumption that statically typed languages are compiled, while dynamically typed languages are interpreted. I know that in g...

3

Solved

I know you can create an anonymous function, and have the compiler infer its return type: val x = () => { System.currentTimeMillis } Just for static typing's sake, is it possible to specify i...
Inattention asked 18/1, 2010 at 19:6

2

Solved

The FAQ for the new Go language explicitly makes this claim: There is a growing rebellion against cumbersome type systems like those of Java and C++, pushing people towards dynamically typ...
Catfish asked 11/11, 2009 at 17:40

5

Solved

It seems to me that the most invaluable thing about a static/strongly-typed programming language is that it helps refactoring: if/when you change any API, then the compiler will tell you what that ...
Omnipotence asked 19/5, 2009 at 0:17

© 2022 - 2024 — McMap. All rights reserved.