Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×

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

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;

func(s.isTrue());
}

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.

Shachar

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

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.

Shachar

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

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;
a.something;

"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?

Shachar

Comment Re:islam (Score 1) 1350

You're missing a ton of background, but this is increasingly getting off topic.

If you like to know why that would not work (as well as some good reasons why Israel cannot do that, at least not in the literal way you wrote it), email me (your email is not public).

Shachar

Comment Re:islam (Score 1) 1350

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.

Shachar

Comment Re:islam (Score 1) 1350

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.

Shachar

Comment Re:Service restored? Umm, not via my ISPs (tested (Score 1) 45

As an addendum to my previous comment, starting at approximately 11 pm Beijing time, three different VPNs I am using- one free, one paid, and one corporate- have all been blocked within China. Hopefully this is temporary. IT offices will have heads on the chopping block if this is still happening in 8 more hours (or less).

As of 11:45 pm, two of my three VPNs are working again. The one that isn't is, of course, the one that people will get fired for. C'est la vie, time for bed.

Comment Service restored? Umm, not via my ISPs (tested 3) (Score 4, Informative) 45

I am in Beijing. I know not of this restored service of which TFA speaks. Anything Google related website-wise (and including other services, like Google Earth) have been blocked on the PC since July or so (as opposed to just slowed down to 1 Kbyte/minute previously) but Google's client on cell phones worked without a problem. What was blocked on Friday was the phone client and any other services not covered by the previous block. As of my posting this message, everything G is still only accessible for me via VPN- Freegate or paid, either works fine. Funny thing, though, if I use Freegate, I can't use any services at slashdot (I had to shut off FG so I could post this message and see how a comment I made in another thread had been moderated).

The only thing that I use frequently that is hit and miss functionally without a VPN is Google Translate, which I am guessing is because some big Chinese web sites claiming to do translation are actually just front ends to Google translate and thus stop working.

Comment Re:Hadrly a new story (Score 3, Interesting) 349

Actually, it is funny, because Orbitz was started by the airlines themselves. They didn't need to scrape cheap airfares to lower prices as much as cut out the travel agents as middlemen:

Five airlines--United Airlines Inc., Delta Air Lines Inc., Continental Airlines Inc., Northwest Airlines Corp., and, later, AMR Corp. (American Airlines)--teamed to create a new online travel service. (American became an equity partner in March 2000; total start-up funding was around $100 million.) Together, the five founding partners controlled 90 percent of seats on domestic commercial flights. Existing computer reservations systems such as SABRE did not present competing fares in an unbiased way, said company officials.

What makes it even funnier to me is that American Airlines was one of the founding companies of Orbitz who was trying to lower prices from SABRE, which American Airlines started in 1960!!!

Comment Re:Bogus algorithm (Score 1) 68

I teach both C and Data Structures. Bubble sort is for my C class where I am trying to make sure the students fully comprehend arrays (most of my students come from a non-existent programming background, and the school isn't sold on my teaching them Python as a first language just yet as apparently I am the only instructor who can use it meaningfully), how indexes work (getting them to reverse an array or a string doesn't quite seem to do it for about half of them), and my better students will have implemented bubble sort on linked lists by the end of the semester, as well. Understanding that bubble sort works isn't a problem for them, but they are only starting to think beyond what a single loop can do algorithmically. I have tried jumping to insertion sort and as a whole there is poor integration of the knowledge to take forward. Good/better/best options just can't happen for most of these students at this point, and so it has to wait for Data Structures where the first sort they learn is Insertion Sort and I don't care which language they use. I guess if someone started using Mindfuck or Ada I might start to care. They add every sort to one big program where they can calculate how much work each sort does and how much system time it takes to operate for randomly generated lists.

As for concerning themselves with cache misses as one person suggested it, until students have a better understanding of systems, that can't be readily done with a class of 40+ frequently unmotivated students (it can with ~10 motivated students, the breakpoint occurring somewhere in the middle, of course), though I start introducing the penalties of register/cache/RAM/disk in this class so that by the time I am teaching embedded systems the students who chose that path usually have a good grasp of it, with the best ones looking even at divide instructions with disdain. With the semester system being what it is, though, teaching all of that as a simultaneous, cohesive chunk of information just isn't going to happen.

Slashdot Top Deals

FORTRAN is not a flower but a weed -- it is hardy, occasionally blooms, and grows in every computer. -- A.J. Perlis

Working...