[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


is this a good c++ replacement or is it a meme lang?
>>
>>108092444
Meme lang, not much came out of it.
>>
>>108092444
>C++ replacement
filtered eh?
>>
>>108092444
Booba
>>
>>108092444
Neither
It's a damn good language in itself, imagine if it had as much support as C and Go gets
It could have replaced C++ and the world would probably have been better off, too.
>>
>>108092650
I'm just gonna be making stupid games with raylib and ncurses, I got both libraries to work with D, is it worth learning? I just want C with some extra features and c++ looks like a fucking mess
>>
>>108093041
>worth learning?
There is nothing to learn. It's more or less C++ but saner. Read the language tour and you can begin writing code. If you find yourself doing clumsy shit like in C++ look at the manual and check of there is some feature that amends that; and most of the time there is.
>>
>>108093041
> I just want C with some extra features
No idea how D stacks up, but you may also want to consider Odin for your use case
>>
>>108092444
We actually used it for everything at my work when I first started out. Tbh it's a wonderful language and it feels much more ergonomic than c++ to me. I particularly like the dub build tool. I was too greenhorn to leverage it's metaprogramming but that's arguably it's biggest feature compared to C++.

All that said, the typical problems of running an exotic language made us switch to c++ eventually: difficulty hiring, difficulty working with teams not also using D, and increased friction using non-D libraries (easy, but tedious).

In contrast using C++ now it's ugly as sin, I fucking hate CMake after being pampered by Dub, but I have a lot more existing projects and resources to draw upon. Plus it's easier to, for instance, package the project for use in python via pybind11.

In my opinion, if you are self employed or if working on a hobby project absolutely give it a try, but if you have other teams with a different stack consuming your libraries, or if you require high quality external dependencies just stick with C++

As an aside, if using D try and use the ldc2 compiler instead of dmd, it uses llvm and does a much better job optimizing.
>>
templates good
garbage collector bad, last i checked a better one may release in 3 months to 5 years
you dont have to rely on the GC, and there are subsets like -betterC that actually use the C standard library as opposed to D's but still benefit from the better type system and what have you
>>
>>108093164 (this anon)
>>108093171
Yeah I forgot to mention the garbage collector is very old-timey but can be disabled with a nogc decorator. BetterC is great there too
>>
>>108093115
isn't Odin still in development?
>>108093164
its just for hobby projects so it's fine, but would be nice if my experience with it could be something I can put on a resume.
>>108093171
yeah betterC is what got me interested in it
>>
>>108093251
For resume it's all about how you describe it. You could say something like "worked with metaprogramming I systems level language and design" bonus points if you add a wrapper around an existing C++ project to call it from D, so if pressed you could say it had C++ and experimented with D, which isn't false but gives the impression the experimental D part is small when actually it's the whole project
>>
>>108093318
mind the typo, should be
"metaprogramming in systems"

As an extra bit of info, there's a good D book by Alexandrescu which would be worth reading if you're interested in the language
>>
File: fact.png (40 KB, 341x498)
40 KB
40 KB PNG
If you can afford garbage collection just use Java. It has a far more expansive ecosystem anyway.

Anyway, D does a lot of things better than C++, so there is that at least. C++ is just kind of icky to work with.

>>108093115
>>108093251
>odin
Shit nophono cares fan about language. It will always be a meme shilled by one or two trannies on /g/
>>
>>108093115
i like odin but the community is horrendous
>>
>>108093687
>I like X but the community sucks
you can apply this to literally anything that exists
>>
>>108093724
I like 4chan because the community sucks



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.