4 ms·
It feels like Java and acts like C. It almost feels like what Objective C should have been.
by asow92 8y ago
It feels like Java and acts like C. It almost feels like what Objective C should have been.
- axaxs 8y agoThis comment is funny to me as it shows how different programmers tastes are. Some would say that is the worst of both worlds.
- asow92 8y agoAt the end of the day these are all just tools and some work better than others depending on the job and the person wielding it.
- mhh__ 8y agoYou can write pure functional code in D, if that floats your boat.
- liveoneggs 8y agoD grew pattern matching and guards? (multi-funcs/etc)
- sametmax 8y agoWhat the difference between a guards and a plain if ? I never understood it.
- mhh__ 8y agoIf you so choose to D can have a relatively clean library implementation. The type inference isn't bidirectional (Or at least it pales in comparison to HM) so it wouldn't be as good as ML-like FP. Pattern matching is a feature of pure functional code rather than a requirement (As useful as it is, every time I touch haskell for fun I always miss the mathematical approach to coding when I then write in C-land). Enforced purity is a feature, however. That's what I was referring to. However, ..., there is no pure-IO so it would be like Haskell before Monadic IO was figured out (I assume).
- philwelch 8y agoJava-style OO is a model where one can and should take the good, dispose of the bad, and improve on what falls in between. Go types and interfaces do a good job of this IMO--like Java classes, Go types can include a defined data structure and methods, but unlike Java classes, there's no inheritance. Like Java interfaces, Go interfaces let you type-check against multiple types that have the same outwards-facing behavior, but unlike Java interfaces, you don't have to actually declare that a type fulfills an interface as you define it. These are all pretty obvious improvements IMO.
- sametmax 8y agoThat's hardly a selling point, a Java syntaxe is only nice if you have beeing doing Java all your life. Comming from a lot of other languages, it's not appealing. What would you choose D for ? What kind of task, project ? And why D and not the competition, given the cost of learning it ?