Re:JavaScript as default language and software stack
by interdrift on Thursday September 24, 2015 @02:30PM
(#10273574)
C# dev here. Coming from statically typed language + dynamic support it just doesn't make any sense to switch to full dynamic.
[ Parent
| on HN ]
Re:JavaScript as default language and software stack
by octaveguin on Thursday September 24, 2015 @02:34PM
(#10273602)
My latest project has been in C# (unity) and it's the first time I've used the language.
It's a breath of fresh air even coming off of using python/django for the last few years.
Types are amazing.
Re:JavaScript as default language and software stack
by Touche on Thursday September 24, 2015 @02:42PM
(#10273669)
Back when I did C# I found trying to do functional stuff painful. Maybe it's gotten a bit better, but I recall creating functions being something like
new Func<int> => { stuff here .. }
Or something like that. I found moving to dynamic languages to be a breath of fresh air. I never cared too much about code completion and stuff like that.
Re:JavaScript as default language and software stack
by bratsche on Thursday September 24, 2015 @02:53PM
(#10273751)
If pain is measured in keystrokes, then yeah.. functional C# might be somewhat painful.
If you haven't tried it you might consider using F#. It seems to have the best of both worlds. It's got a static type system with functional features, but also a very lightweight and beautiful syntax (heavily influenced by OCaml, fwiw).
Re:JavaScript as default language and software stack
by TheCoelacanth on Thursday September 24, 2015 @03:47PM
(#10274155)
That's one way to do it, but the typical way is identical to ES6: `() => expression` or `() => { statements }`
Re:JavaScript as default language and software stack
by douche on Thursday September 24, 2015 @02:46PM
(#10273700)
Lambdas and LINQ has made this much simpler:
var foo = (param, anotherParam)=>{ /* do stuff */};
Re:JavaScript as default language and software stack
by erdeszt on Thursday September 24, 2015 @05:19PM
(#10274823)
Except that this is not working. You have to explicitly type lambdas if you assign them to local variables(or to properties, fields). But I don't see it as big trouble though.