Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Trust the World's Fastest VPN with Your Internet Security & Freedom - A Lifetime Subscription of PureVPN at 88% off. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Comment Re:Not alone (Score 2) 120

Makes no sense. Pascal is a perfectly fine language, even classic Pascal. Fortran, especially classic Fortran 77, is really lacking in many ways (newer versions add newer features but that's like comparing Visual Basic to Basic and trying to call them the same language). Granted Modula-II or Ada is much more suitable than Pascal.

Comment Re:Misguided priorities for sure (Score 1) 209

Also amazingly useful for just having FM tuner. Listen to the news while you hike rather than only what you remembered to preload (I don't preload stuff on the phone, that's what an ipod is for). If I go jogging then it's nice to have the phone but I also have to carry around something else to listen to. And no I don't have a data plan that allows me to stream audio for free, and I am not always somewhere with good reception.

Comment Re:Arduino uses C++, Pi uses Linux (Score 1) 374

Yup. Having been at a C house for some years now after having done C++ embedded systerms earlier, I am amazed at some of the early code had so little concept of encapsulation, functional coherency, extensibility, and so forth. Which is something you normally figure out very quickly in C++. Of course you can do this in C, but you need the experience on how to do it. In C++, once you have a class it's second nature to stick with that class when you have a newer variant of what you're interfacing with, maybe it's a subclass, maybe it's an interface class, but in C I see so many people just create a new API, throw in ifdefs, etc.

Comment Re:They said the same about mobile (Score 1) 374

Well, C++ is essentially C, especially the part of it that is low level. And Android has C in the kernel, which is Linux. The point was at the bottom of it all is almost always C.

Squeak primitives are written in an extreme subset of Smalltalk that translates directly to C, much of this just for the practical ability to debug it while building Squeak from scratch. After the fact though it's possible to do Squeak totally in Squeak, once you have an assembler. And this brings up one very common reason for C being at the bottom of so many things - it's the most common portable way to do very low level code. In other words, C acts like a portable assembler. Squeak wants to be portable, so it's easier to have the primitives in C rather than port them every time you move to a new machine. Sure, Rust can do this, but it's essentially brand new.

Comment Re:Arduino uses C++, Pi uses Linux (Score 1) 374

This is essentially what "Embedded C++" is, it gets rid of the bloat or features that tend to bloat and then relies on programmer discipline after that. So not strictly C++, but highly compatible with it (and even more so with older C++ standards).

RTTI really is extra fluff that probaby never should have been added, in my opinion (and I used C++ before it was there). It's a high level language feature, and C++ really does hurt itself by trying to simultaneously be a high level language and a low level language.

Comment Re:Arduino uses C++, Pi uses Linux (Score 1) 374

The problem I found with templates is that extra instantiations are *not* thrown away. They may be 99% the same but it doens't know that without actually comparing the code, and if it does know they're the same it is hard to keep that 1% difference and throw away the rest. You really need a C++ oriented linker with hins from the compiler, as opposed to a general purpose linker using name mangling (ie, binutils).

For instance, a template instantiated with "unsigned int" will result in slightly different code than one for "unsigned long".

In the past I have written templates that are nothing more than type casting wrappers around a basic type Ie, an collection of "void*" but then a template that lets you have a collection of any pointer type while still being strongly type checked.

Comment Re:snarky: managed languages RulZ! (Score 1) 374

Occasionally for a laugh I will click on a web link to a Yahoo Answers or other such site that asks "How does a computer work?" Invariably it's something like "This is the cpu, it does the thinking" and then moves on to the monitor and keyboard. So simplified even a kindergartener would roll their eyes. And yet the same site when asked about an automobile will mention internal combustion, pistons, gears, etc. For some reason, it's considered normal to treat computers like they're magic.

Comment Re:Arduino uses C++, Pi uses Linux (Score 2) 374

I dunno. There is still significant overhead with C++, which is a big problem with small devices (128KB of code for example). There's the issue of the linker not really figuring out how to share object code for templates to avoid typical bloat. There's the hidden operations behind the scenes that cause problems for novice programmers running out of space or wandering why their code is so slow. There really is no good way to make exceptions both fast and use little code space (a shame since I like them if used properly).

I do want to use a better-C-than-C. C with classes just for the sake of structuring code more coherently. C with better type checking rules. C where I can release a semaphore on any exit from a function. A stripped down C++ that more resembles Cfront without all the newer fluff.

Comment Re:snarky: managed languages RulZ! (Score 2) 374

There are a lot of people who say they know C who can't handle some of the simple stuff in C, as I have seen in many interviews.

I started saying "I'm sorry that I will ask some very simple questions..." because I felt embarrassed asking someone with so much on-paper experience who is applying for a hands on development job to do such simple things. Then so many of them flub it. Now I'm wondering if my apologies that the question is "simple" actually ends up as an insult for someone who can't figure them out.

Slashdot Top Deals

You can do more with a kind word and a gun than with just a kind word. - Al Capone