programming-languages

Should I use multiplication or division?

Here's a silly fun question: Let's say we have to perform a simple operation where we need half of the value of a variable. There are typically two ways of doing this: y = x / 2.0; // or... y = x * 0.5; Assuming we're using the standard operators provided with the language, which one has better performance? I'm guessing multiplicati...

How would you go about implementing off-side rule?

I've already written a generator that does the trick, but I'd like to know the best possible way to implement the off-side rule. Shortly: Off-side rule means in this context that indentation is getting recognized as a syntactic element. Here is the offside rule in pseudocode for making tokenizers that capture indentation in usable form...

Programmer's Toolbox or The One and Only Language?

We've just had YAFLQ and it got me thinking. What's the more popular approach? Dedicating your life to "The One and Only True Language"? Or just realising that they're all just different tools in your toolbox, and having a range of languages to select from, allows you to pick the best tool for the job at hand? I guess this can be ext...

Which one is more likely to succeed: clojure or arc?

Which one of the following new lisp implementations is more likely to gain the momentum and more mainstream acceptance, arc by Paul Graham or clojure by Rich hickey? They both launched at the same time, but seems there is more community interest in clojure so far, from both lisp and java folks. ...

What are the biggest differences between Python and Ruby from a philosophical perspective

What are the key differences between the "python way" and the "ruby way" ...

What to do if there are two programmers that have different preferences for a programming language.

I am hired in one of the electricity providers in our country and will start next month. There are three existing programmers, and each of them are assigned in the different departments. They do have an IT department but no head. The result is that the development of the software systems is not centralized because each programmer is on h...

Pros and Cons of being a java expert?

After spending much thought on the issue and learning a few things about my languages preferences ie. I absolutely dislike php and everything it stands for. I am wondering whether or not it would be wise to delve into the world of java while I am student. This gives the advantage of the fact I am already proficient in java and most of ...

What are the best uses for each programming language?

I come from a web developer background, so I'm fairly familiar with PHP and JavaScript, but I'd eventually like to branch out into other languages. At this point, I don't have a particular direction or platform that I'm leaning toward as far as learning a new language or what I would use it for, but I would like to learn a little bit mor...

Has .NET removed the distinction between various languages?

We have always had languages that were preferable to be used in a particular scenario. For a quick prototype development, VB6 was an obvious choice. VB6 was chosen in projects that had a simple desktop user interface and standard and un-complicated database interaction requirements. If you wanted to develop a device driver using low-leve...

Is anyone using D in commercial applications?

Ok, this is a little open ended, but I think D could do with a bit of promotion. Personally I think D is a superb implementation language - but it's not mainstream enough yet for many people to take it seriously. Since it's not commerically backed, the only way to change that is through community effort and visibility. So I'd really li...

Does the D programming language have a future?

I stumbled several times over D and really asked myself why it isn't more popular. D is a systems programming language. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of quality assurance, document...

Should I first study algorithms or another programming language?

As a fairly novice programmer who has acquired a reasonable level of competence in C++, what should I do next to advance in general programming ability? Obviously, both learning new programming languages and studying algorithms are important, but what should take highest priority? More generally, how in-depth should my eventual study...

Would syntax for composition be a useful addition to Java?

First off, I know next to nothing about language theory, and I barely know any other languages except Java, but I had an idea that I think would be cool, but I need you guys to tell me: a: why it sucks b: how language x has had that for years c: how my mind sucks d: all of the above The idea would give composition the same ease of code ...

Ideas from function/logic/object-oriented programming

Can someone please point me to articles or books that discusses different programming paradigm (function/logical/OOP)... I am not looking for the syntax details but the ideas that make them good.. for ex: using functional programming we avoid any side-effects.. If I know the idea I could write side effect free program even in a languag...

Constructing a simple interpreter

Hello, I’m starting a project where I need to implement a light-weight interpreter. The interpreter is used to execute simple scientific algorithms. The programming language that this interpreter will use should be simple, since it is targeting non- software developers (for example, mathematicians.) The interpreter should support basic...

Tips for learning MUMPS (M) / Cache?

I'm interested in getting involved/up to speed on VistA, the Veterans' Administrations open source medical records system. To that effect, I understand I should learn the MUMPS (M) language upon which the software is based. Does anyone have any getting started tips or book recommendations on this language and environment? Any tips on ge...

Which scripting language do you use the most and why?

Which scripting language do you use the most and why? Given the opportunity, which other scripting language would you use and why? Python Groovy Ruby Perl PHP Jython JRuby TCL JACL IronRuby Lua Javascript etc ...

What is Type-safe?

What does "type-safe" mean? ...

What is meant by "thread-safe" code?

Does it mean that two threads can't change the undelying data simultaneously? or does it mean that the given code component will run with unpredictable results when more than one thread are running it? ...

Is it better to master a few programming languages than to learn many?

I find myself constantly reading books on programming languages, design patterns, etc. and playing around writing small programs to just test the waters. Often I am reading more than one book at a time on different subjects (reminds me of school days now that I think of it). Out of your experience (subjective of course), is it better to ...