The static-typing tag has no wiki summary.
-5
votes
1answer
122 views
Which is easier: using static language dynamically or dynamic language statically? [closed]
In your experience, is it easier to utilize dynamic features in a static language (e.g., via dynamically loaded libraries or variant data types) or static features in a dynamic language (e.g., via ...
3
votes
6answers
438 views
In Java, would you sacrifice type safety for a nicer programming interface
When and why would you generally sacrifice typesafety for a nicer programming interface?
Let me give you an example: if you had the choice between two event aggregators, which one would you prefer ...
30
votes
1answer
1k views
Why does the .Net world seem to embrace magic strings instead of staticly typed alternatives?
So, I work in .Net. I make open source projects in .Net. One of my biggest problems with it isn't necessariyl with .Net, but with the community and frameworks around it. It seems everywhere that ...
29
votes
4answers
2k views
What can Haskell's type system do that Java's can't and vice versa?
I was talking to a friend about the differences between the type systems of Haskell and Java. He asked me what Haskell's could do that Java's couldn't, and I realized that I didn't know.
After ...
84
votes
16answers
21k views
What functionality does dynamic typing allow?
I've been using python for a few days now and I think I understand the difference between dynamic and static typing. What I don't understand is under what circumstances it would be preferred. It is ...
9
votes
5answers
596 views
Are dynamic languages at disadvantage for agile development?
From what I've read agile development often involves refactoring or reverse engineering code into diagrams. Of course there is much more than that, but if we consider the practices that rely on these ...
3
votes
4answers
528 views
Why is Invariance, Covariance and Contravariance necessary in typed languages
Ok not really sure if I'm right.
I only recently learned that I needed to have contravariant interface to be able to pass that interface as a parameter in C# and this feature was only added in .NET ...
5
votes
3answers
240 views
Dynamic typing across the whole technology stack - where to enforce data validity?
Over the past year or two, I've been playing with newer technologies in my side projects. As a web developer, I've gone from the following (and still the following, at work):
The 'classic' technology ...
6
votes
2answers
206 views
Language that can statically ensure a map's fields are present
If data is simple and objects are complex, I'm curious if there are any existing statically typed languages that would be able to augment(?) a map type into a type with guaranteed fields. I realize ...
1
vote
3answers
311 views
Using Map in Java (or other strongly-typed languages) to work with unstructured data
After looking at the core data type for frameworks that deal with unstructured data in java:
json java library: JsonObject
Mongodb java api: BasicBSONObject
SolrJ (Solr java client): SolrDocument
...
6
votes
4answers
189 views
Are there any languages that allow the static context of a method call to be available at runtime?
Is it possible for a method to know the type of the method it is called under? So for example in the following object orientated psuedo code:
Instance io = new InstanceSubclass();
io.doStuff();
Is ...
11
votes
4answers
2k views
Using static classes as namespaces
I have seen other developers using static classes as namespaces
public static class CategoryA
{
public class Item1
{
public void DoSomething() { }
}
public class Item2
{
...
10
votes
1answer
474 views
(Dis-)advantages of structural typing
I’ve just watched this talk by Daniel Spiewak where he talks about the advantages of structural typing as compared to Scala’s ans Java’s nominal typing. One example for this difference would be the ...
9
votes
6answers
635 views
Is hungarian notation a workaround for languages with insufficiently-expressive (i.e. Haskell-style) static typing?
Edit
To be clear, I'm not talking about annotation variable names with the data type, but rather with information about the meaning of the variable in the context of the program. For example, a ...
1
vote
2answers
125 views
Does hierarchial inheritance belong to the past? [closed]
Recently it came to my attention that hierarchical inheritance may be a relic of thinking of classes as "structs with functions" rather than a product contract-driven mentality.
Consider, as a simple ...
7
votes
5answers
510 views
What is better for prototyping: a statically-typed language, or a dynamically-typed one?
When working out the design for a new system, is it better to start with a statically-typed language (like Haskell), or a dynamically-typed language (like Ruby)?
Arguments I can think of:
With a ...
16
votes
4answers
1k views
Architectural differences between dynamic and static languages
Area there any major architectural differences when designing applications that will be built on static languages (such as C# or Java) and dynamic languages (such as Ruby or Python)? Wich are the ...
5
votes
4answers
434 views
Can static and dynamically typed languages be seen as different tools for different types of jobs?
Yes, similar questions have been asked but always with the aim of finding out 'which one is better.'
I'm asking because I came up as a dev primarily in JavaScript and don't really have any extensive ...
17
votes
3answers
454 views
Are there any empirical studies on the effect of different languages on software quality?
The proponents of functional programming languages assert that functional programming makes it easier to reason about code. Those in favor of statically typed languages say that their compilers catch ...
10
votes
7answers
708 views
Is there a programming language out there with these qualities?
I'm looking for a programming language that has the following:
static typing
distributed programming across a cluster using actors (no shared memory, message passing)
functional programming
compiled
...
5
votes
3answers
346 views
How should I program with dynamic typing language even no type is noted on documentation?
I lived long time on static typed language world. All types were explicitly noted on each variables and arguments. Now I have to use some kind of dynamic typing language. (Smalltalk) The problem is ...
2
votes
4answers
257 views
Function locals: variable used in just one function
In OOP, static scope means the scope is linked to the class, and instance scope is linked to a specific instance of the class.
Some languages support static locals, which allow a value to be retained ...
4
votes
5answers
541 views
Functional language with C-like syntax
I've been looking for functional language with C-like syntax and static typing. So far my choice would be Nemerle. Is there anything else/better?
EDIT:
second choice would be Lua or Go.
Any pros ...
24
votes
12answers
5k views
Why does PHP have interfaces?
I noticed that as of PHP5, interfaces have been added to the language. However, since PHP is so loosely typed, it seems that most of the benefits of using interfaces is lost. Why is this included in ...
11
votes
9answers
1k views
Dynamic vs Statically typed languages for websites
This statement suggests that statically typed languages are not ideal for web sites:
I’ll contrast that with building a
website. When rendering web pages,
often you have very many components
...
8
votes
13answers
3k views
Would a statically typed alternative to JavaScript on webpages be practical?
Preference for dynamic and static typing is largely a matter of taste, and different people find them more or less suitable in different situations.
My question is, would it be technically possible ...
35
votes
5answers
2k views
Dynamically vs Statically typed languages studies
Do there exist studies done on the effectiveness of statically vs dynamically typed languages?
In particular:
Measurements of programmer productivity
Defect Rate
Also including the effects of ...
24
votes
9answers
2k views
Do dynamic typed languages deserve all the criticism? [closed]
I have read a few articles on Internet about programming language choice in the enterprise. Recently many dynamic typed languages have been popular, i.e. Ruby, Python, PHP and Erlang. But many ...