9,428 karma · joined Jul 10, 2015 (11y ago) · 3,276 submissions
comment 9y ago · link · parent
I can't think of any typed language I've used or seen in active modern professional work where you could validate a value as part of a type at compile time.
comment 9y ago · link · parent
comment 9y ago · link · parent
I also wouldn't be surprised if Clojure tends to do surprising things in this area with taking Clojure.spec more to the compilation stage; some of the most interesting research into type systems has actually be done by lispers (i.e. Typed Racket, Core.Typed) and there is active interest in it among the Clojure community.
comment 9y ago · link · parent
Typing has its place but the idea that it catches all bugs at compile time certainly isn't true; the cycle of running the app itself, running its tests, is just as important for statically-typed code as dynamically typed.
Languages that have a sophisticated contract system* (like Clojure's Clojure.spec library) have a bit of a leg up in my opinion. You can much more precisely explain and control and test for the specifics of all values flowing through your system well beyond merely what type they are.
-- * Clojure's devs don't refer to spec as a contract system because it is quite a bit more versatile than that, and some are actually using it for compile-time checks, compile-time generative testing, and other nifty things that aren't covered by a "contract" system.
comment 9y ago · link · parent
It was very interesting to see that Clojure projects were among the least buggy of all languages represented. The report looked at a variety of factors to explain "bugginess", including typing and LOC, among other things. The conclusion in Clojure's case was that the very low line count necessary to write Clojure programs was vastly more influential on bugginess than for languages that were statically typed.
And I suppose that's true: a language that requires you write very little code is going to produce programs that are easier to write (and thus maintain), regardless of whether it is statically or dynamically typed.
1540.
Dealing with Complex Table Views in iOS and Keeping Your Sanity(medium.cobeisfresh.com ↗)
3 points · by hellofunk · 9y ago · discuss
comment 9y ago · link · parent
1543.
Marble Machine (music instrument using 2000 marbles)(youtube.com ↗)
3 points · by hellofunk · 9y ago · discuss
comment 9y ago · link · parent
comment 9y ago · link · parent
1551.
Google still a ‘wonderful’ company, says EU's top antitrust enforcer after fine(cnbc.com ↗)
1 points · by hellofunk · 9y ago · discuss
comment 9y ago · link · parent
This is not at all how functional data structures work. You're assuming that the data structures are the same as non-functional data structures, but merely without the ability to mutate them. That is not correct. Proper functional data structures are implemented completely differently.
One obvious exception to this is the Swift language, which is not really a functional programming language, and it does not have functional data structures. It uses copy-on-write which is somewhat similar to what you describe, but is not how functional programming languages do it.
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent