News for hackers. Stuff that matters.
Re:Meet Crystal language in its birthday. It is compiled and... by Pxtl on Friday September 06, 2013 @11:57PM (#6343905)
Yes, but the upside is you avoid the complexity headaches of interfaces and covariance/contravariance and generics and all that stuff.

Heck, look at all that FactoryFactoryFactory stuff you have to deal with when you want to swap out core parts of a framework - you end up with config files and XML and you have to make sure the guy who made the original framework designed it to allow you to change the part you want to change with your modular swap... in a dynamic language? Monkey patch. It's ugly, but it works.

Heck, look at serialization. If you want to serialize/deserialize static objects, you need metadata that includes the types of everything - stuff like XSD in XML. Dynamic languages don't need that stuff, which is part of the modern popularity of JSON... Javascript and its buddies just play nicer with JSON. I actually wish there was a popular simplified analogue to XSD for Json because I actually miss the ease of serializing into objects that you get using XML/XSD in C# or JSON in Javascript.

The dynamic-ish nature of exceptions that seem like an unholy abominatable hole in the type-system in static languages (or a source of unending-agony in Java's checked exceptions) suddenly fit nicely into a dynamic-typed language paradigm. Python embraces a "easier to ask forgiveness than permission" approach, throwing exceptions willy nilly and it makes nice clean code.

Plus, working in a dynamically typed language heavily discourages premature optimization because you already threw performance out the window.

But yeah, you're basically working without a net, and that kinda sucks.

Re:Meet Crystal language in its birthday. It is compiled and... by anonymouz on Saturday September 07, 2013 @02:25AM (#6344144)
What you describe is not a problem of statically typed languages in general, but of Java in particular.

Try Haskell for static typing done right.

Re:Meet Crystal language in its birthday. It is compiled and... by pjmlp on Sunday September 08, 2013 @05:18AM (#6348274)
Or any other language in the ML family.
Re:Meet Crystal language in its birthday. It is compiled and... by kybernetyk on Saturday September 07, 2013 @01:51AM (#6344106)
> Yes, but the upside is you avoid the complexity headaches of interfaces and covariance/contravariance and generics and all that stuff.

Maybe it's a matter of what you are accustomed to but not having explicit declared types gives me headaches. I find code without types horribly unreadable - because I can't see at the first glance what data a function processes, etc.

Also dynamic typing and its runtime type checking gives me that uncanny feeling of "something might be wrong but I won't find out till I hit it".