Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×

Comment Re:Subtle attack against C/C++ (Score 1, Insightful) 189

C++ (and do a lesser extent C) lose support because of their extremely poor support for utf8. And the absurd part of it is that they could easily do a good job. Utf8 is just a byte array with various routines to interpret the code. Glibc does a reasonable job for a C library...not ideal, but reasonable.

All the array needs is a way to address a chunk by character # rather than by byte #, a way to copy of a character or a slice of chars, and a way to determine the general character classification of any character. Also a few methods: first(), last(), hasnext(), hasprior(), next() and prior(). And these all "sort of" exist, except getting the general character classification. (Do note that these functions need to operate on utf-8 characters rather than on bytes.) But several different ways of doing this are already known. Vala, e.g., handles it without difficulty, and is able to emit C code (using Glibc libraries).

So it's not a programming difficulty that's holding things up. It's the standards bodies...or, perhaps, some members of them.

But I've looked at C++11, and it is not a satisfactory answer. Vala has a good answer. D (Digital Mars D) has a different good answer. Even Python3 has a pretty good answer. (I don't like that in Python you can't determine memory allocation within the string.) Also Racket, etc. But C++ doesn't.

Comment Re:Wonder how Ada 2012 would fare... (Score 2) 189

It's hardly a solved problem. There are approaches that can be made to work, but that's not the same thing. The current approaches are all clumsy, and often that's a charitable description. It's usually doable. Saying anything beyond that is fulsom praise.

OTOH, because different languages have different basic derived structures, it's often not clear exactly what the best approach would be, even when one is considering things carefully. For one purpose the best I've been able to come up with is marshalling everything into a byte array, and then separating it back out. Doable, but hardly what I'd call "a solved problem". Probably an insoluble problem because the different languages map the same concept differently internally. So you need to deal with it on a special case by special case basis.

Comment Re:Wonder how Ada 2012 would fare... (Score 1) 189

Perhaps you need to define what you mean by "more general purpose". I tend to consider C the most general purpose of languages, because it *isn't* specialized to some task. It's true that , e.g., FoxPro was better at interfacing to the FoxPro database, but that's NOT being general purpose, that's being special purpose.

OTOH (to get back on thread) I don't consider C a very secure language BECAUSE it is lacking in specializations. This means you need to keep creating, e.g., hash tables from scratch, and every time you do it you are likely to introduce an error.

Ada is in an in-between state. It's very secure against some types of errors. The facility for defining specific types is a particular instance. If one defines a meters type, then one cannot store an inches type into it...unless one uses a numeric literal, because one needs to allow instances to be created from numeric litrals. OTOH, this very security introduces verbosity, and verbosity is a common entry point for errors. (I used the meters/inches example because of the nortorious example of the space probe where that was misused. Ada did NOT save the day. And the reason that it didn't was because doing things properly would have been too verbose.)

In principle, every "Turing complete" language is as general purpose as every other. Practical considerations are the distinction between them. If you're doing database programming, then you are less likely to make mistakes if you use a language that contains extensions specialized to make database use easier. (I barely count embedded SQL, because while SQL is reasonably great for manipulaitng databases, it's lousy at interfacing to programming languages. Everything either needs to be converted into a string, or a blob, and blobs are clumsy to handle.) But note that these "databse extensions" are specializations away from "general purpose".

Comment Re:Different views on a free market (Score 1) 223

You don't need a specific law for it to be regulation of the market. Yes, it's fraud. But if you want an unregulated market, you want one in which fraud is permissible.

P.S.: Adam Smith appeared to believe that a free market implied that there would be sufficiently good information about rival goods to enable a potential customer to evaluate which was better, and probably even whether any of them were desireable. This, however, can only be (partially) achieved in a regulated market.

Please Note: That can you bought which say it contains 3 servings and 0 grams of sodium per serving may well contian more sodium that some heart patients could safely consume. And it may be more common for one person to consume the entire can at one time than for it to be divied into 3 separate servings (for either separate people or separate episodes of consumption).

Comment Re:Read your lease... (Score 1) 319

I had this strange dream where I lived in a country that valued freedom and liberty. Then I woke up to this dystopian nightmare police state that serves the interests of landlords, banking cabals and oligarchical collectivists. It was a nice dream.

The idea that all contracts are somehow sacred is BS - you cant ask people to pay for things then renege on critical details. Its more or less fraud in legalese.

Bring these cases to a jury. Any BS trickery in legalese should be shot down.

Banning AirBnB is generally BS, there are a few cases where the rental leads to an issue and those should be handled case by case. To ban the activity which is an activity in the private home of consenting adults is a joke.

Funny, didn't we hear arguments about what consenting adults can do with each other in private from these same folks on another issue?

Comment You want those 5 Know-nothings to rule on this?? (Score -1, Troll) 141

Don't let those five smug-n-stupid white men rule on any - ANY - matter until one of them dies and we can fix the Reagan/Bush stacking. Wait. Don't let them set precedents. Avoid engagement. They can wreck the future of the human race, as the US is pretty much ruling the world.

Comment Re:Different views on a free market (Score 1) 223

Actually, a free market would be an unregulated market, were such a thing to exist. This doesn't make it desireable, and, in fact, no such thing has ever existed. The closest that I can think of are various blackmarkets, where all sorts of competition are allowed, including killing off the competition. Those are still officially regulated, but in practice are frequently only minimally regulated. (Killing off you competitors will often lead to a serious investigation by the police.)

N.B.: All laws against deceptive marketing or mislabeling of what you are vending are infringements on the free market, as are any regulations against killing your custiomers.

The really amazing thing is that people think a free market is desireable. This is because they are usually only considering certain degrees of freedom. (Which ones tend to vary in an unexpressed way between individual proponents.)

HOWEVER: Once you accept that the market will not be free, you run smack up against "Who will watch the watchmen?". Regulatory capture is so frequent that to ignore it is foolish, but no currently used approach has proven effective in the long term.

Slashdot Top Deals

Today is a good day for information-gathering. Read someone else's mail file.

Working...