Live data from Hacker News

D for the Win

tomerfiliba.com

101–105 of 105 posts

Re: D for the Win

#101
post #52

Earlier quoted context omitted.

Nevertheless, many of the design decisions make sense in that context. For example: the difference in initialisation of simple data types vs slices and maps. For an application programmer these are weird inconsistencies. But they make sense in the domain. Or the way error handling works. Very tedious to have to do-check, do-check, and not be able to have automatic upwards delegation. But in system programming it's ab…

I don't do anything quite so tedious in my Go-based webserver projects. For functions that can return errors that I don't have a way to recover from (db calls, for example), I use a simple rapper function that automatically logs errors and panics. That doesn't seem to me like much of a source of difficulty or complexity.

Web apps are apps, they have different expectations and provide different levels of robustness guarantees. As I said, Go's design decisions are motivated by a different problem domain.

That being said, I've followed a similar pattern in writing Go web apps. I passed errors upwards from their originating site to the HTTP handler functions, because that was where the error handling was possible with the best context.

Re: D for the Win

#102
post #45

Earlier quoted context omitted.

"Write in Python/Ruby/whatever and optimize the slow parts in C" echoes around the programming community endlessly, but I wonder how many people have actually done it. It's kind of hard. - Automated tools like SWIG have weird limitations and are complex. - Binding to a C library manually means you have to wrangle the data from a heapy, pointery dynamic language world into whatever format the C libary wants. - Writing…

V8 + C++ has served me pretty well; C and Lua likewise.

Lua bindings are so wonderfully straightforward. A happy consequence of the design goals.

Re: D for the Win

#103
post #45

This article is full of D hype and so so so far away from reality. Alright, some basics; Everything that has to access persistent information frequently is bound by disk/network/whatever IO, and web programming is no different. The reason why languages such as Python and Ruby are very viable options for this task is they are quite a lot abstracted away from bare metal to hasten the development process. The wait for I…

"Write in Python/Ruby/whatever and optimize the slow parts in C" echoes around the programming community endlessly, but I wonder how many people have actually done it. It's kind of hard. - Automated tools like SWIG have weird limitations and are complex. - Binding to a C library manually means you have to wrangle the data from a heapy, pointery dynamic language world into whatever format the C libary wants. - Writing…

Writing your application in Python/Ruby/Whatever and optimize the slow parts in C sounds like a good way to have the worst of both worlds: the lack of efficiency of the interpreted language combined with long development time, difficulty porting, buffer overruns and segfaults of C programming.

Re: D for the Win

#104
post #88
post #66

Earlier quoted context omitted.

Tell that to all those guys writing desktop utilities in Python slow as molasses. Every time I get some GNU/Linux GUI utility running very very slow and check the code, it is Python under the hood.

Please, it's really unfair to single out Linux GUI tools. Basic system utilities are also written in python, like yum, which masks its slowness by doing network access on each invocation and makes you think that's why it's so slow.

...and it it used to be far worse. In the old days it was spending most of its time parsing metadata, until the C metadata parser introduced, and later sqlite databases were added to repositories as an alternative for the XML metadata.

I even backported the C metadata parser to CentOS 3 and 4, because it was a whole different experience altogether:

http://lists.centos.org/pipermail/centos-devel/2007-May/0017...

Re: D for the Win

#105
post #95

Earlier quoted context omitted.

I think of Go as "C++", but as brought to you by the guys who made C, with tasty sprinkles from CSP and Python.

It's mostly Java from the people who made C, but didn't learn much from their C design mistakes.

Ridiculous. Go's lack of verbose classes and lack of inheritance, pass everything by value, the existence of pointers, first class concurrency primitives, compile to binary / no interpretation/JIT, lack of a VM, built in unit testing/benching, fast compile times, memory usage, easy C integration, etc etc all make it very different from Java.

I've been writing Go full-time for over 2 years and used to write mostly Java/C#, so I should know. When I started with Go and ported many of my personal Java applications, they all were much more maintainable and straight forward in Go.

Of course C had always been favorite language, and all I ever really wanted was a "modern" C, so I am probably biased.

Post reply on HN