C++ and Scheme
- Started
- Last post
- 20 Responses
- DeIntegro
New to programming. From my research so far it seems like an imperative programming language like C++ is widely popular; however, there's a lot to be said for functional programming languages that are more "stable" such as Lisp or Scheme. I guess it is necessary to learn both styles. Or can one stick to functional programming and be relevant outside academic circles. For you pros out there fill me in.
- ********0
There are more styles you could learn, stack based languages like Forth, for the full picture, and Lisp, but these are old and you won't use them for anything
SML/NJ is a great functional language
- armsbottomer0
when i start a c++ project, i plan, strategize, code, debug.
when i open a lisp repl, i meditate.
- and with clients who randomly change specs, which approach is better?vaxorcist
- inv0
I practice, very few companies outside universities use Lisp or Scheme. I spent a lot of time with them at school, but during my six years in the biz I havent touched them.
Teach yourself C# or some other usefull language. A tip for you can be to look into F# which is a functional programming language from MS research that plays nice (and integrates) with C#. This will give you the best of both worlds.
- stewdio0
Call me a hater, but do not under any circumstances align yourself with a Microsoft-controlled language. They're a company that wins by having really great business models. Not really great products.
C++ is the speed goldmine. If you need something powerful and fast that's your ticket. Here's openFrameworks which will help you get up and running more smoothly: http://www.openframeworks.cc/ For reference openFrameworks : C++ :: Processing : Java. Also worth noting that just about everything (including OS's) are written in C++. And if you know C++ you can easily migrate to Objective-C which is the native language for Mac OS X and iPhone.
Having said that, I actually prefer functional programming languages. I totally agree with @armsbottomer. If we're going to split hairs I actually prefer Scheme over Lisp (or at least original Lisp) because I think lexical closures are more elegant. (Thank you to JavaScript for teaching me what that means—the original JavaScript interpreter was written in Scheme and JavaScript itself still contains some of that DNA.) But really Scheme is just a subset of Lisp and if you like one you can at least sympathize with the other.
Right now though I'm going wild for Ruby. Not Ruby on Rails, which is fine and all, but actual plain Ruby. I've been mixing some Ruby with OpenGL to do data animation work for clients and writing the code feels like such a cleaner undertaking than I'm used to in Java. (Which has been my mainstay for doing similar work in the past.) I little while back I wrote this quick start guide for getting up and running with Ruby-Processing in under 10 minutes. If you're on OS X give this a try:
http://stewdio.org/blog/2010/03/…I have some friends who are becoming diehard Python fans. I've dabbled with Python and it seems like a great language. But for me, right now at least, I'm all about Ruby.
- vaxorcist0
get ready for some religious debates.......
You're right about the totally different mindsets..... some languages are dereived from machine architecture, others from math theories....
I like Python these days.... started with C and Pascal, and once upon a time, 6502 assembly..... I hated Lisp, but I was probably too young at the time I attempted it......
- vaxorcist0
But seriously..... I'd be interested in knowing from personal experience, which approaches and languages people have found on ACTUAL PROJECTS that were best/worst at handling the inevitable random spec changes that clients tend to demand.....
In the past, I've found that some clients were less likely to change specs with a C++ project than with a more dynamic language, but it may be culture....
- this really depends on the nature of the work. naturally, a higher-level language is going to make things easier here.SteveJobs
- DeIntegro0
Thanks guys. i appreciate the comments.
- acescence0
scheme and lisp are higher level and more abstract, c is lower level and will give you a better understanding of how the machine actually executes the code, but it also means you're doing more low level housekeeping. there are lots of companies using scheme and lisp though, orbitz engine is common lisp for example.
- SteveJobs0
"Call me a hater, but do not under any circumstances align yourself with a Microsoft-controlled language. They're a company that wins by having really great business models. Not really great products."
just stating my disagreement with this statement. :)
- ********0
Create an account at stackoverflow.com.
- It's an invaluable website for programming knowledge.********
- yes, that and Joel on Software....vaxorcist
- It's an invaluable website for programming knowledge.
- vaxorcist0
acescence's note is right..... and interestingly there seem to be "the few, the proud" when it comes to companies that use Lisp/etc.... usually a small number of really smart people write something that elegantly handles a complex problem... like Orbitz tackling routing and reservations.... things that require really clear thinking and insight....
- vaxorcist0
Years ago, I was on a C/C++ project where management had no idea... it was like the joke "Just Start Coding and I'll Go See What They Want"
But since there was so much housekeeping code to write we actually could be somewhat useful while management dawdled...
- SteveJobs0
to make porting between mac/pc, i've built extensive c/c++/obj-c api wrappers and libraries to make substantial changes easier. with your first couple of bigger projects you'll feel like you're moving in slow motion. but in my opinion, after that, it's almost as fluid as dealing with something like vb/c# or some other rapid application development technology.
i have zero experience with most of the other technologies mentioned in this thread, so take that as you will.
- no one is asking about portable applications you fucking old tool.********
- ouch.kpl
- no one is asking about portable applications you fucking old tool.
- DeIntegro0
Thanks all. I need to build. As a kid I was into reverse engineering my toys. Hopefully that hacker spirit can help me with taking a system about and building it with code. It's a beginning.
- Pupsipu0
OpenCL, CUDA and GPU programming is becoming very popular, because the hardware rearrangement makes it inevitable. They use subsets of C/C++ now but since what you're programming is different you don't get into the mess of C++.
The speed and energy savings from GPUs are ridiculous. GPUs are 10x faster than CPUs. It's only a matter of time before someone rethinks the legacy stuff done on CPUs and ports it to an OpenCL style framework for GPUs.
It doesn't even matter if that's inappropriate and unnecessary. The programming world is stuck so deep in legacy programs that it needs a giant kick in the ass.
- C++ to an API is almost like a scripting language compared to writing it all yourself....vaxorcist
- there's no need of kick in the ass, low level programing will always stay, it's what make the machine efficient********
- some will forget 'em and start using high level languages but 'em will remain near the core of the machine********
- they will work silently so that your fancy HLL work fine********
- bliznutty0
sorry but the flinstones called and said you're stealing their intellectual ideas..
Object Oriented Programming - it's how things are done today (Java, .NET, etc..)
- vaxorcist0
"Functional programming" does NOT refer to things like:
function foo($arg){
print $arg
}Look up lambda calculus.... also interesting is:
http://www.defmacro.org/rambling…
- stewdio0
@bliznutty You've really branded yourself there.
