Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

Comment: Re:Perl, my favorite language is rated higher... (Score 1) 382

by Sun (#48906761) Attached to: Is D an Underrated Programming Language?

Forgot to add:
The second point above might seem petty. After all, that's why D distinguishes between structs and classes, right?

Then please consider the following:
void func(lazy bool e);

void otherfunc()
SomeStruct s;


Since func receives a delegate, s is allocated on the heap (despite this not being immediately obvious to people not versed in D). As a result, s's destructor is not going to get called. Ever.


Comment: Re:Perl, my favorite language is rated higher... (Score 1) 382

by Sun (#48906707) Attached to: Is D an Underrated Programming Language?

Due to compiler bug, the following:

SomeStruct[10] s;
// Do stuff with s


Up until recently, s's destructors would not be called.

In the language definition proper:
auto s = new SomeStruct;

The destructor is never going to be called, even when s's memory is reaped by the GC.


Comment: Re:Perl, my favorite language is rated higher... (Score 4, Informative) 382

by Sun (#48863163) Attached to: Is D an Underrated Programming Language?

When doing low level system programming, there aren't that many viable choices out there. C, C++, possibly ObjectiveC (not familiar enough with it to tell for sure). That's about it. Of those, ObjectiveC is, pretty much, a one platform language. C++ is used quite extensively, but it is way too complex, resulting in most C++ programmers not knowing what the 1@#$@!# they are doing. Also, some C++ features are not suitable for some low level scenarios. For example, you probably wouldn't want your kernel code to throw exceptions, or do iostream formatting, in kernel code.

C, on the other hand, is a very simple language. It has no expensive features (though, to be honest, that mostly means that if you need something expensive, you'll need to do it yourself). As such, it is without competition for what it offers. The most it loses in market/mind share is through scenarios that used to require low level system programming but no longer do.

As for D....

D advertises itself as supporting this mode. My employer chose to develop a low-level high performance low latency system in D. I've been programming it for the past half year. I'm not overjoyed. I don't hate D, but my personal opinion is that we'de have been better off going with C++ (though, to be honest, I love C++ like few of my peers do).

I have two main gripes with it on that front. D has a horrid GC (though no GC provides the latency requirements we need), and though it claims you can do without it, you really can't. At least, not without giving up on much of the language features and almost all of the standard library. When comparing to C++'s ability to use custom allocators with the standard library, D's phobos seems deathly pale.

D also claims to support RAII semantics. I happilly went about implementing a reference counting pointer, only to find out that there are cases where you cannot use a struct with a destructor, and there are cases where you theoreticaly can use one, but in practice find that the compiler will not call your destructor. All in all, RAII is an untested unutilized option in D.


Comment: Re:Gotta react to the market (Score 1) 382

by Sun (#48863115) Attached to: Is D an Underrated Programming Language?

The D syntax may be more readable than C++, but to claim that it is simpler is just farcical. The number of language constructs, their specialization and their focus is staggering. For a language that set up to simplify matters, it has done anything but.

When you do:
A a;

"something" might be a member. It might be a property. It might be a method with no arguments (which gets called). It might be a function defined outside the class with a special property. It might be any of the above on a member of A, specially defined (subtyping). I will not be surprised to hear I missed something.

How is that simple?


Comment: Re:islam (Score 1) 1350

by Sun (#48762523) Attached to: Gunmen Kill 12, Wound 7 At French Magazine HQ

The big one is a peaceful resolution to Israel/Palestine.

Personally, I don't think it is as big a part in solving that problem as you seem to think. My personal take on this is that it is a very convenient straw man to use ("we're only doing this to help the poor Palestinians", with no limitation on what "this" is). History suggests that very few Muslim and Arab leaders care much about the actual Palestinians. Should that problem magically (because no other option seems likely at this point) disappear, Muslims will just pick (manufacture?) another one.

Regardless, I'm curious. How do you get peaceful resolution to the Israeli/Palestinian conflict? I'd like you to try to limit your suggestions to things that had not been tried before (as those, obviously, do not work).

Also, saying that solving one problem is a key factor in solving another means that if the first is impossible, so is the other.


Comment: Re:islam (Score 1) 1350

by Sun (#48757207) Attached to: Gunmen Kill 12, Wound 7 At French Magazine HQ

OR let me ask it this way. Name one Islamic Nation where Christians, Jews, Buddhists, Atheists or anyone else is actually FREE to practice their religion (or lack thereof).

AFAIK, in Iran Jews do have the right to practice their religion. They are also represented in government.

Don't get me wrong. They are legally defined as second class citizens, their government position is reserved, and they are precluded from participating in the general elections (which are not exactly free either), and their situation is, in most ways, worse than those of the Muslim Persian. Still, in your narrow metrics, Iran is such a country.

I know there are also Jews in Yemen, and I think also in Turky. I don't know the details, but sketchy memory says that they do have at least some freedom of practicing religion. There are also Jews in Egypt, and there they are, at least according to the dry letter of the law, free to practice.

Now, had that been an "and" list, I'm not sure I'd be able to come up with as long a list.


Comment: Re:No, They Haven't Called Me (Score 1) 246

by Sun (#48645245) Attached to: 65,000 Complaints Later, Microsoft Files Suit Against Tech Support Scammers

That is not certain.

I don't have first hand experience, but if I were to call someone to let them know that something bad happened to their kid, I'd be hesitent to leave too many details in a voice message. You generally want to downplay the injury until you know the person receiving the news can handle it.

As such, I'd probably leave a message saying "hi, my name is X and I'm calling about your kid, please call me back". If your attitude is scammers and spammers oriented, you are likely to not do so.


Comment: Re:What's happening to Linux? (Score 1) 257

by Sun (#48486191) Attached to: Bad Lockup Bug Plagues Linux

Funny, I'm moving in the opposite direction, but reach the same conclusion. Working with (most) modern IDEs just seem like masochism after you've used VIM.

The learning curve for vim is horrible. I can understand anyone who gives up before reaching reasonable productivity levels. Once you've gone through it, however, the IDEs are just no competition.


Comment: Re:A law's bad effects aren't decisive (Score 1) 260

by Sun (#48343721) Attached to: Computer Scientists Ask Supreme Court To Rule APIs Can't Be Copyrighted

You have to remember that the protection code has is reduced compared to the protection that other works of art has. The law and precedence (IANAL) acknowledge that there is significant amount of function (i.e. - non-copyrightable) parts to a program.

The question here, as I see it (and, again, IANAL) is whether the function's arrangement and names, which might have some expressive (i.e. - copyrightable) value to begin with, can turn to purely functional by the simple fact that implementing it is essential in order to make things work.

As far as I remember, other laws (including the hated DMCA) has language that suggests it does (allowing reverse engineering for the purpose of interoperability).


Comment: Re:This just proves... (Score 1) 173

by Sun (#48343679) Attached to: Codecademy's ReSkillUSA: Gestation Period For New Developers Is 3 Months

What you don't get (possibly because you are not a programmer) is that Ruby-on-Rails-with-XHTML-and-JQuery-NoSQL-Hadoop technology is simplifying programming. Simplify it any more, and you'll likely end up with worse (with both likely over the near future).

Back at the day where the programming language was hard, only people with the knack could do it. Programs still had bugs (and always shall), because programming is a complex task and we did not have the tools to simplify the complexity back then.

And then the demand for programmers sky-rocketed, and people who believed you were right started creating RADs (rapid application development environments). Pretty much all the buzzwords you dumped are in the category. The idea was to create an environment that will simplify the programming process, so that constructing a program be more like plumbing.

Guess what. It still isn't. The only difference is that now there are people doing programming that are not programmers. They are plumbers. The result is what you see. The problem is that, unlike plumbing, people still expect the end result to be anything they like. It is the lack of limitations on the end result that causes the need for understanding what you're doing, not the technology with which you develop.


Error in operator: add beer