Re:Specification for the D Programming Language
by rafaelvasco on Wednesday January 08, 2020 @04:27PM
(#21995973)
It used to be that way, but these last 5 years, C# and .Net have grown a lot. If given the choice, i would choose C# every time; Such a pleasant language to program in. All desktops support, native binary compilation, easy (easier?) interop with native code. Lot's of features to promote performance, like structs by reference, explicit stack allocation etc. Well I'm a game developer so for me it's perfect; That said, i remember reading D's specification and really liking it. As it never gained much of a traction with gamedev I looked away. Who knows, maybe in the future.
Re:Specification for the D Programming Language
by DrBazza on Wednesday January 08, 2020 @02:03PM
(#21994613)
D today is C++2040.
Re:Specification for the D Programming Language
by mlyle on Wednesday January 08, 2020 @02:45PM
(#21995010)
Nah, because C++40 will just accumulate more and more unpredictable cruft while D is clean.
Re:Specification for the D Programming Language
by qznc on Wednesday January 08, 2020 @03:14PM
(#21995271)
D is not clean. It already has some cruft. For example, there should be no "@safe" annotation but an "@unsafe" one. Unfortunately, D picked the wrong default back then.
Ok, "in relation to C++" it is clean. :)
Edit: There is a proposal to fix it: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1028.md
Re:Specification for the D Programming Language
by teleforce on Wednesday January 08, 2020 @07:07PM
(#21997161)
Pardon the pun, but @safe is a safe choice. IMHO, for general language it is more productive by having low hanging fruits as the default. The popularity follows consumer->enterprise->military->aerospace, and safety gets more critical up the systems food chain. That's propably the main reason Ada is not a common or popular programming language since it is for higher end of the food chain.
Re:Specification for the D Programming Language
by wwright on Wednesday January 08, 2020 @07:40PM
(#21997390)
This makes more sense as an argument for dynamic typing or GC by default than a “safe” keyword, imo.
From my experience with Rust, there’s basically _never_ any cost in sticking to safe code. The standard library and crates pretty much always give you enough tools.
Unsafe is really only ever needed if you’re implementing the core of an abstraction, which is probably not something that’s going to deter “casual” users imo.
The borrow checker and and type system definitely can be thorny at times, though. Other times they’re very easy to work with! But having a more ergonomic way to fall back to Java-like behavior, if only for debug builds, would make languages like Rust _much_ more accessible.
Re:Specification for the D Programming Language
by WalterBright on Thursday January 09, 2020 @12:46AM
(#21998844)
D's nascent ownership/borrowing checker will operate at the function level. So you can incrementally use it as it suits your application.
Re:Specification for the D Programming Language
by ossworkerrights on Wednesday January 08, 2020 @04:03PM
(#21995784)
Rust appears to have a strong push on hackernews, and perhaps DLang should push harder in here. I remember first time i used this language on a friday night on my raspebrry pi and it just worked. The learning curve was pretty low for doing basic stuff such as controlling gpios. Wondering if d lang should perhaps target web devs more, as an easy way to extend, say, nodejs or write wasm apps. It really looks promising.
It's like C# to Java, which has traction only through relentless flogging by Microsoft. There's nobody to flog D.