Tag Info

New answers tagged

2

One could try to apply this to programming languages. There is something to be said for the dynamic nature of languages. For example, while I've been using C# since 2002, there is something to be said for what new features have been introduced, what has been deprecated so that it isn't always the same language. While there is the similarity of some English ...


0

When a programmer says "I'm going to program this from scratch" they mean thet don't start with a code base of a similar program and modify it. They mean they start with nothing except and idea and requirements.


-1

Probably because it's rare that you will ever paint only part of a wall. Where most programming is done incrementially.


3

Also think how programs are compiled/distributed has changed. Remember, before DOS, most computing was on mainframe-esque systems. Compilers were delivered as part of the hardware because you rarely got off-the-shelf software. If you were lucky, you got source and compiled for that machine. Even today, in many Unix-environments, you still have to compile ...


2

When PCs were first available, there were few programs available. Without a programming language, the computer would be pretty well useless. BASIC as implemented then was a simple small language which could be run in very little memory. Microsoft got its start selling MS-DOS to IBM. The availability of programming language is reported to have made the ...


10

The first significant difference is that when Gates wrote his version of BASIC, computer hardware was expected to ship with one or more development languages. Today, people are expected to get languages separately. The second significant difference is that today, the Open Source community develops robust, free compilers/interpreters for popular languages. ...


2

Short answer: the internet. Longer answer: The internet provides a cheap, fast, international, searchable, well-known method of communication. The internet technically existed in the 70's, it wasn't until the 90's that it became really well-known. It is difficult for a bunch of people who want to get together and write a high quality, free compiler (or ...


12

He got there early. Since then the internet has revolutionised the way we share and create sofware. No longer do you need to source a floppy disk with the specific software you need, it is all a mere download away. The market is saturated and the development community has embraced open-source and free software, the competition is rife and we are late to ...


19

I don't think Bill Gates made a lot of money off of the Alttair (did anyone?). A bigger break was buying a DOS from someone else, fixing it up and selling licenses to IBM for their PC. IBM along with a lot of other makers of PC's had few choices of operating systems so they stuck with MS-DOS. This did include BASIC, which was a big benefit at the time ...


2

In many languages the convention is to use PascalCasing for types(the only exceptions I can think of are lisps and STL). Using camelCasing or snake_casing allows you to easily name a variable after it's type(like void foo(Bar bar)). snake_casing also allows that. You'll have to change more letters(remove underscores and decapitalize letters), but you get ...


5

There really isn't hard evidence for preferring camel-casing over pascal-casing. Though that doesn't stop people from arguing over it a lot. If you're consistent, then there's not a huge difference either way. No casing comes with disadvantage of providing no hints for what words start where, which makes it more difficult to mentally parse and can lead to ...


8

Binary Nand Lets look at how NAND can be implemented with just AND or OR gates. NAND becomes one of: !(a && b) !a || !b Either of these can be seen as short circuiting. The reason that NAND doesn't exist is that it is easily rewritten as not(a and b) Xor XOR, is at its heart, a parity checker. To check the parity of two values, you need to ...


2

The short answer is because the truth table for XOR doesn't have a single row of True's or False's. If the first argument to OR is True, then the answer is True, regardless of the second argument. If the first argument of AND is False, then the answer is False regardless of the second argument. BUT If the first argument of XOR is True, or False, it still ...


3

Perl6 has got short-circuit XOR but its meaning of XOR is specific. I've repeat my comment jist here: there are two meanings of XOR: if count of true arguments is odd if only exactly one argument is true Example for difference: XOR (True, True, True) gives True with the 1st meaning and False with the 2nd meaning. If Perl6 machine detects at least 2 ...


10

NAND is either !a || !b or !(a && b) both will be short circuited when a is false. XOR can't be short circuited at all as @delnan explained


0

A top down or recursive descent parser (LL(k)) constructs a left derivation. Your first diagram roughly outlines the steps of such a parse. A bottom up (SLR(k) or LALR(k)) parser constructs a right derivation. Your second diagram roughly outlines the steps of such a parse. What is missing from this discussion is the differences between suitable grammars. ...


4

The way it was explained in my compiler class, well over thirty years ago, is that a leftmost derivation scheme works best with a top-down (e.g. recursive descent) parser, while a rightmost derivation scheme works best with a bottom-up (e.g., SLR(1), LALR(1), YACC et al) parser. Using a leftmost derivation scheme with a bottom-up parser requires the parser ...


1

On their own, both left-most and right-most derivations are nothing but arbitrary rules that disambiguate which steps to take when parsing or generating with a CFG: many different orders of nonterminal expansion are imaginable which ultimately lead to the same tree, and LMD and RMD are simply two simple strategies to decide which route to take. For ...


0

Older languages sometimes are more strict; consider what is possible in Java: public interface Ifc { public static final Ifc MY_CONSTANT = new Implem(); } public class Implem implements Ifc { } I have seen the anti-pattern above, and it is really ugly (I would have forbidden it). Both compilation units use each other. But Ifc can be compiled to code ...


1

Because the resultant structure will not be obvious to a compiler. A compiler will move through the grammar, step by step, in a systematic fashion. In practice, there are techniques that can shortcut this but if we want to formally and rigorously reason about grammars, we want it to all be as explicit as possible. This directly leads to the OR syntax. The ...


0

Programming is certainly a Concept and it won't bound to the language, but you might bind yourself to a language as a Programmer. More you learn the concept, less you face the limits. I agree with the quote.


1

It takes a while to become really good in a language, to know all idioms, to know the most important parts of the library and how to use them. It's perfectly fine to be an expert programmer in only one or two languages. Not everyone has the time to follow every trend that emerges. Aside from that, being a good programmer is more about knowing the concepts ...


2

For a programmer with enough experience, a programming language is a tool which has strengths, weaknesses, relevant use-cases, and syntax. For such a programmer, when faced with a problem, he does not choose the technology to use from the set of technologies he already mastered, but rather according to the technology he believes is the most appropriate to ...


3

Because you can only inherit one class. If you've got two interfaces whose implementations are complex enough that you need an abstract base class, those two interfaces are mutually exclusive in practice. The alternative is to convert those abstract base classes into a collection of static methods and turn all the fields into arguments. That would allow any ...


0

Perhaps the intent was to provide the ability to create mixin classes by replacing the need for injecting static information or functionality via a dependency. This idea seems related to how you can use extension methods in C# to add implemented functionality to interfaces.


2

A good motivating example is in the Java standard library, where you now have list.sort(ordering); instead of Collections.sort(list, ordering); I don't think they could have done that otherwise without more than one identical implementation of List.sort.



Top 50 recent answers are included