Live data from Hacker News

Programming in D: Tutorial and Reference

ddili.org

111–120 of 134 posts

Re: Programming in D: Tutorial and Reference

#111

I constantly feel like inferior languages are picked up, while superior languages are discarded. It's almost as if the universe had a law: "inferior technology is always preferred no matter how hard you seethe". Examples: * Python preferred over Ruby * TypeScript preferred over Dart or even JavaScript (which is fine and, as a bonus, doesn't require compilation step like TS) * Go is preferred over Crystal and D. While…

> Python preferred over Ruby

Python's syntax is closer to written human language, and it uses more obvious words.

> TypeScript preferred over Dart or even JavaScript

Typescript is a strict superset of JavaScript.

> Go is preferred over Crystal and D

Go is backed by a big Corp

Re: Programming in D: Tutorial and Reference

#112

Earlier quoted context omitted.

Garbage collection was about what I would be missing. I mentioned before what could be missing from OP's point of view.

Ok. I think the better C mode is cool and I think it’s worth a try for his interest and project.

I fully agree with you, but I think that if you present it as an option to somebody you should write a line or two about the potential downsides, so they have a better picture. Sorry if I was too abrupt in my criticism of your post. :)

Re: Programming in D: Tutorial and Reference

#113

I constantly feel like inferior languages are picked up, while superior languages are discarded. It's almost as if the universe had a law: "inferior technology is always preferred no matter how hard you seethe". Examples: * Python preferred over Ruby * TypeScript preferred over Dart or even JavaScript (which is fine and, as a bonus, doesn't require compilation step like TS) * Go is preferred over Crystal and D. While…

> The Go argument that it's popular because it's simpler is absurd in the sense that no one really forces you to write complex code and use classes or other advanced OOP features in D.

The same argument applies to C++. No one is forcing you to create complex nested templates or other difficult features.

Yet many criticisms to the language are in the form: "But it is possible to write very complex code that no one understands!"

It is absurd.

Re: Programming in D: Tutorial and Reference

#114
post #85

I constantly feel like inferior languages are picked up, while superior languages are discarded. It's almost as if the universe had a law: "inferior technology is always preferred no matter how hard you seethe". Examples: * Python preferred over Ruby * TypeScript preferred over Dart or even JavaScript (which is fine and, as a bonus, doesn't require compilation step like TS) * Go is preferred over Crystal and D. While…

Regarding ruby and python I thought the 2 were in the same league, esp compared to perl. Over 20 years ago I evaluated both and went ruby because of the more consistent api and of course pythons forced whitespace is an easy tie breaker against it. At this point I'm not to pleased that many younger programmers that python as some sort of default and tend to end up writing far too fancy code in it when it ends up being…

Performance matters (as long as most other things are the same).

Python won over Ruby because of performance. Ruby is easily the slowest of all mainstream languages.

Re: Programming in D: Tutorial and Reference

#115
post #104
post #102

Earlier quoted context omitted.

Even Ruby has JIT now

True! But pjmlp was referring specifically to advanced JIT implementations, so I wondered which JITs he was referring to as advanced.

In Ruby's case that would be RubyMotion, TruffleRubby and JRuby.

That trace back to Apple's efforts with MacRuby, or Sun's (for a while Netbeans even had Ruby support).

Re: Programming in D: Tutorial and Reference

#116

I constantly feel like inferior languages are picked up, while superior languages are discarded. It's almost as if the universe had a law: "inferior technology is always preferred no matter how hard you seethe". Examples: * Python preferred over Ruby * TypeScript preferred over Dart or even JavaScript (which is fine and, as a bonus, doesn't require compilation step like TS) * Go is preferred over Crystal and D. While…

The superior languages on your list just reflect your personal preferences. There are not perfect languages, just appropriate languages for given application.

Re: Programming in D: Tutorial and Reference

#117
post #115
post #104

Earlier quoted context omitted.

True! But pjmlp was referring specifically to advanced JIT implementations, so I wondered which JITs he was referring to as advanced.

In Ruby's case that would be RubyMotion, TruffleRubby and JRuby. That trace back to Apple's efforts with MacRuby, or Sun's (for a while Netbeans even had Ruby support).

If you go that route, GraalPy is there too, so the argument is not as strong as it seems.

Re: Programming in D: Tutorial and Reference

#118

Earlier quoted context omitted.

For game development? I imagine having to use only structs but not classes would be something that forces a "non idiomatic D" experience. Dynamic arrays sound like something that's very useful for a game. I don't know, there are plenty of features that are incompatible with better C that makes D, D. Generally speaking, garbage collection would be the biggest in my opinion.

You can still use classes in BetterC - you just have to allocate them yourself. D recently acquired "placement new" which makes that more convenient.

[deleted]

Re: Programming in D: Tutorial and Reference

#119
post #80

It's been about 10 years since I last dipped my toes in the D waters. At the time (v 2.067) I stumbled across some surprisingly bad warts in the standard library that prevented me from using it for my intended purposes which writing software tools for bioinformatics. As other posters have noted, language elegance is secondary to the ecosystem when you want to get things done. For anyone who has been using D for an ex…

The Youtube channel Tsoding did a great overview of the D language, overall, he liked it!

Re: Programming in D: Tutorial and Reference

#120
post #110

Earlier quoted context omitted.

Oh the issue isn't with serverino itself but with the lack of tooling-support for the language features that serverino makes heavy use of. And while serverino is open source, so one can ultimately view its source code, not having access to modern IDE type inspection adds a lot of unnecessary friction.

Still curious: How did you choose Serverino among the many servers?

Might seem silly, but the choice just came from looking at (https://code.dlang.org/search?q=websockets) and seeing that serverino is the only one maintained. vibe-d isn't listed there, I only learned about that later. Basically, serverino has good SEO.
Post reply on HN