A few notes on choosing between Go and D for a quick project
Chris via Digitalmars-d
digitalmars-d at puremagic.com
Sun Mar 15 05:52:36 PDT 2015
On Sunday, 15 March 2015 at 00:14:44 UTC, engnieer wrote:
>
>> Unfortunately, for speech and language processing (synthesis,
>> speech recognition etc) Python is too slow. Everybody uses
>> Python at first, but the serious code that is later put into
>> real world applications is usually written in C or C++. This
>> is a fact. I know people who developed speech analysis
>> frameworks in Python and are now thinking of rewriting it in
>> C++ for commercial purposes.
>>
>> Python is good for protoyping, but if you need fast
>> applications, it is usually C/C++ (or D).
>
>
> What you are saying is not wrong, except for the
> generalizations to "everybody".
>
> Obviously you are not aware of the other people/industries who
> use python for non-performane critical applications (not
> prototype, but real large applications), there are several
> reasons, but don't want to bore you with details (one of which
> is the "super structure").
>
> I do wish we were using D everywhere, and I do use it for
> personal and small tools at the job.
>
> - engineer
Of course, we all can only talk about our own experiences.
Apart from performance issues, for language processing, string
handling etc., Python quickly becomes a nightmare (UTF-8). Then
there are issues like the one that classes cannot really have
private variables.
Sometimes advocacy of Python seems a bit absurd to me when it is
along the lines of "Use Python, because it's easy. But don't use
real Python, use Cython or Numba (and whatnot), Python is too
slow". I.e. "Use it, but don't use it!" This shows that there is
something wrong. You don't have this problem with D. You too wish
you were using D everywhere, which tells me that the Python +
C(++) solution is not optimal.
All I'm saying is that when people start a new project, I advise
them to use D instead of Python. But there is no way to win
against the cult of Python in scientific programming. It's too
easy, too tempting at the start. Instant gratification and the
feeling that you're on safe ground. D can't compete with this
easily.
Maybe we should invent (or continue with existing efforts) to
write a scripting language based on D (or a Python interpreter or
something that serves as a bridge to existing technologies (other
than C)).
If I have time, I might also put together some code snippets with
the most common tasks in programming, like startsWith and so on.
More information about the Digitalmars-d
mailing list