Newbie to D, first impressions and feedback on the 5 (and more) first minutes.

cy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue May 24 10:05:23 PDT 2016


On Tuesday, 24 May 2016 at 15:27:45 UTC, llaine wrote:
> I'm running Fedora 23 on a daily basis and the installation was 
> OK. Not as easy as on mac but still.

Yeah, rpm based distributions like Fedora/Redhat/etc have 
historically been a real pain when it comes to installing stuff. 
Depending on individual files with no indication what package 
those files are in for instance.

I recommend something based on "pacman" these days, though you'll 
have to hunt a while if you want one that hasn't gone and added a 
bunch of binary linkage to systemd to their entire dependency 
tree.

portage is also alright, but a little tricky to use, and you need 
a speedy CPU to compile quickly.

> Congratulations on this point to all the people who made dub. 
> Programming in 2016 should be like this.

It does have its issues, but dub is awesome.

> The only bad point I can see here is that it looks like it's 
> more easy easy to get ready on a mac than on a linux machine.

A Fedora machine. Installing dub on Arch or Debian should work 
just fine.

> This part was a bit different. By being a total newbie to the D 
> language I don't really know where to begins.
> Of course I went to the getstarted.html page but

> as a newbie with no system programming background I feel there 
> are too many choices for me.

Oh, I don't think system programming is the issue here. It is 
kind of intimidating that the first place it points you for a 
basic total newbie tutorial is a big dead tree book that you can 
buy. It seems to me there could be something simpler than that 
for newbies, but a little more extensive than just the random 
code snippet it shows on the home page.

> The only bad point here is that I can't find a "Effective D" 
> page. A document that gives tips for writing clear, idiomatic D 
> code.

Wow, good luck there. I think D programmers are pretty 
unopinionated as to how you should write code. The language is 
complex enough that it keeps things in line pretty well on its 
own. And "idiom" is another word for "opinion" so ultimately how 
you should code depends more on who you're working with than the 
language itself.

I would appreciate a tips and tricks page though, with advice 
like separate large amounts of code into separate projects to get 
it to compile faster, or use ld.gold since D has ludicrous 
amounts of linkage going on, or my trick of throwing in --nodeps 
after the first compile that fixes dub's issues with eager 
dependency tracking. Or how you make parsing easier by importing 
inside functions instead of globally to the module. I wonder if 
there should be a wiki page like that, hm...

https://wiki.dlang.org/Tutorials by the way


> Well in one word. It sucks. I've tried to setup an editor with 
> all the features that we can see in the wiki matrix.

Uh... huh. I just use emacs, because sometimes I'm coding on a 
netbook that isn't running X.

> autocompletion

Not as simple as it sounds. What should auto-complete? Module 
names? Misspellings? Potential imports? Download the list of 
package imports? File names? function names? Local variables? 
How's it going to detect the names of local variables? How's it 
going to detect which function the cursor is in? Autocomplete is 
something I don't really like, because it requires that your 
editor be some big dumb kitchen sink IDE in order to manage all 
that complex logic of guessing what you mean when you hit <TAB>.

There is one autocompletion bug that irritates the pants off of 
me, though. gdb. Why can't they fix their stupid debugger so that 
it let you auto-complete across the '.' character?

gdb's written in 69 megabytes of solid C though, not D.


More information about the Digitalmars-d-learn mailing list