# Computer riddle: I treat vars like D

Little 'bout my age: far from that of B
Yet in my syntax, you will find some C
The way I treat vars, that is much like D
I do take objects, but I'm not like E
If it starts with F, you'll know it's not me
Now I challenge you, just what could I be

I guess this should be fairly easy for people who study computer-related stuff.

## Update: some clues

As of now nobody has guessed the language I am thinking about. I understand that this seems to be quite broad and many languages can fit to some degree, but my thought is, if there are still many candidates, then you might as well make the rules(clues given in the riddle) stricter and screen the candidates down. E.g. some said that the "D" line refers to D having local vs. global variables, but so many languages do, so you might want to look deeper into, say, variable naming conventions (clue: just an example, nothing to do with that).

Also, here are some additional clues:

Age

The age is farther from B than all four guesses as of the time of writing.

How it treats vars

Think typing and stuff.

Even more clues:

Also think memory management.

Objects
Again, since few if any language is like E with respect to the object system, things remain pretty broad, so you may as well look at a certain aspect of it to screen candidates, more specifically,

the philosophy: E very strongly adheres to OOP.

also, I might need to clarify that

objects can mean anything, but I did mean it in the OOP sense: an abstraction of a value (or set of values) with specific functions that are owned by and can operate on it (methods).

One more, really big clue

"If it starts with F" is actually trying to suggest the first letter in the language's name is important.

With this one I probably made it too easy, though.

## The explanation

So Chiel ten Brinke got it right, the correct answer is

Go (official site)(Wikipedia)

Little 'bout my age: far from that of B

Go was created in the 2009, just 7 years ago. The clue doesn't give a specific range, but at least one can expect no possible answer to be older than C.

Yet in my syntax, you will find some C

Go's syntax, although pretty special in the family, is largely based off C, with C keywords, curly braces, operators, etc. Also, although there isn't always a semicolon after statements, they are just implicit, it's perfectly fine to use semicolons like in C, and that would be required to separate statements when doing inline stuff. However, that still doesn't throw C++, C#, Java, etc out of the pool of candidates.

The way I treat vars, that is much like D

I stated in the extra clues that one should look at memory management and typing system. Now D has static, strong, inferred typing with automatic memory management (as in: delete vars when they are no longer needed). "Inferred" alone throws many languages out of the question, but since I didn't explicitly talk about type inference it is just a quite probable, but unconfirmed constraint. Automatic memory management filters out C++ and friends.

I do take objects, but I'm not like E

In the extra clues I said the language was not like E that it doesn't adhere strongly to OOP, so C# and Java are out too, as well as Eiffel which was one of the answers you can find below. Go doesn't have classes, but structs can have methods, so OOP is pretty well supported, but the language itself doesn't emphasize OOP.

If it starts with F, you'll know it's not me

In the extra clues, I mentioned that "starts" is trying to suggest that the first letter in the language's name is important. Now if you see that the riddle went all the way from B to F, and the first letter is important, it should be logically sound to think the language starts with G, the next letter in the sequence. That's not necessarily the way you should think, you can also say that it's Eiffel if not for the other clues. The other best candidates thus far, Rust and Swift, couldn't fit this.

So in the end,

The ones who guessed Rust and Swift did very well, they only missed the BCDEF-G clue. Also, kudos to Klaws for suggesting Deesel, the answer only misinterpreted the line about E (it was about objects, not variables).

• I have no idea as I specialise in a few languages rather than have a broad knowledge of lots, but I really like the concept, and the riddle. – jhabbott Feb 1 '16 at 17:16
• it's the esolang AAAAAA, based on the rhyme scheme of this riddle – question_asker Feb 1 '16 at 18:20
• B, C, D, E, F, .... Go. And it actually matches the other descriptions kinda well. – Chiel ten Brinke Feb 2 '16 at 17:33
• @question_asker You might like this then: esolangs.org/wiki/AAAAAAAAAAAAAA!!!! You need to include the exclamation marks. – busukxuan Feb 3 '16 at 16:17
• Nope, but this one should work: esolangs.org/wiki/AAAAAAAAAAAAAA%21%21%21%21 – GOTO 0 Feb 4 '16 at 8:25

B, C, D, E, F, .... Go!

Little 'bout my age, far from that of B

Go is a lot newer than B. It's been developed in 2007.

Yet in my syntax, you will find some C

It is a compiled, statically typed language in the tradition of C and C++ with curly code blocks etcetera.

The way I treat vars, that is much like D

Variable type declarations can be inferred in both languages

I do take objects, but I'm not like E

In Go mutable objects and pointers can be shared between goroutines while in E, all values are objects and computation is performed by sending messages to objects.

If it starts with F, you'll know it's not me

Go starts with a G

• Haha beat me to it. – Alex Terreaux Feb 3 '16 at 15:12
• @ChieltenBrinke Well, that isn't exactly what I meant with the "E" line, but you actually found another very important thing I wanted to make explicit in the riddle but couldn't: the difference between their concurrency. – busukxuan Feb 4 '16 at 10:47

I like the other answers, but there's a clue that they really don't capture well. This answer is similar to the others, but I think hits some of the clues more accurately than the other answers.

You are

C#

Little 'bout my age: far from that of B

Obviously, B is older than C, which is older than C#

Yet in my syntax, you will find some C

Many c-style syntatical elements are in C#

The way I treat vars, that is much like D

The set of base types and the way they're handled are very similar in the two languages

I do take objects, but I'm not like E

Objects in E require the def keyword, C# uses class

If it starts with F, you'll know it's not me

There is another language called F#, so don't confuse that with C#

Now I challenge you, just what could I be

• syntax would also fit for C#'s name syntax containing a C ;) – Zaibis Feb 2 '16 at 9:06
• "The way I treat vars": maybe referring to the struct/class value/reference type duality in both languages. dlang.org/spec/struct.html msdn.microsoft.com/en-us/library/ms173109.aspx – Miles Feb 2 '16 at 10:00
• The way you guess is better than anyone else's, but you might want to take it further. There are new clues in the question if you want. – busukxuan Feb 3 '16 at 9:26

My guess is that you are:

Java

Little 'bout my age: far from that of B

As the predecessor of C and its decendents, B is a lot older than Java

Yet in my syntax, you will find some C

Java shares a lot of syntactical elements with C

The way I treat vars, that is much like D

Java and D share the concept of local vs global variables, and Java has a construct for a foreach, which is present in D but not C.

I do take objects, but I'm not like E

While there are syntactic similarities between E and Java, how objects are defined and handled are not in that set. Java uses explicit typing, where E allows loose typing and defining of variables/returns.

If it starts with F, you'll know it's not me

Now I challenge you, just what could I be

• This was my first thought! – J Atkin Feb 2 '16 at 15:42
• Nice guess, but that wasn't it. I figured I needed to clarify things a little, so there are some new clues up there. – busukxuan Feb 3 '16 at 9:28

You are

C++ (or maybe Objective C)

because

The syntax is a superset of C, it "takes objects" (is an object oriented language), and its name doesn't start with F. The other languages B, D and E could be pretty much anything that would fit the clues, not sure if they are referring to something specific. I suspect the use of letters as code words for computer languages is a trick to throw the readers off and make them forget there is an actual programming language named "C".

• I would hope that B, D, and E (as well as C) all refer to the actual programming languages with those names. – jhabbott Feb 1 '16 at 17:18
• @jhabbott Yes they all do. – busukxuan Feb 1 '16 at 17:19
• Actually, B is the predecessor of C, the D is C like. I think this is the correct answer, exactly what came to my mind ^_^ – ABcDexter Feb 1 '16 at 17:51
• Regarding the "anything that fits" stuff, I realized not everyone thinks the same as I do, so look at the updated clues in the question :-) it's actually more like "anything that makes less languages fit". – busukxuan Feb 3 '16 at 9:40
• @busukxuan thanks, I had a look, but your puzzle has turned out to be a lot more sophisticated than I had originally assumed, and my knowledge of programming language is clearly not up to the task. By the way, the one OOP language I'm surprised no one has mentioned yet is Python, so if you allowed me one more guess that's what I would suggest, but making that fit your clues is beyond me. I hope others consider this as an option though to see if it fits. – user17947 Feb 4 '16 at 1:56

You are

Javascript

Little 'bout my age, far from that of B

Yet in my syntax, you will find some C

javascript has C-like "curly brace" syntax.

The way I treat vars, that is much like D

javascript has local and global variables, like D has

I do take objects, but I'm not like E

javascript is object oriented, but doesn't use classes, like E has.

If it starts with F, you'll know it's not me

javascript starts with a J

• Great first answer, and welcome to Puzzling.SE! c: – Deusovi Feb 2 '16 at 15:51
• E doesn't actually have classes, but looking at classes is a good start, looking at aspects that can filter more languages out is the right concept to solve the riddle. Check the new clues in the question. – busukxuan Feb 3 '16 at 9:31

Can you be?

Deesel, formerly known as "G". https://en.wikipedia.org/wiki/Deesel

Little 'bout my age: far from that of B

First released on 2004-11-06, so it's tad younger than B (ca. 1969). http://sourceforge.net/p/deesel/news/?source=navbar

Yet in my syntax, you will find some C

Based on Java, there is a bit of C in the syntax.

The way I treat vars, that is much like D

Both Deesel and D were influenced by Java, Both feature garbage collection.

I do take objects, but I'm not like E

Variables are dynamically typed in E.

If it starts with F, you'll know it's not me

Obviously, neither "Deesel" nor "G" start with an "F". However, "G" starts with a "G", which would be the next letter in the alphabet.

• Hi Klaws, welcome to Puzzling SE. For answers to be accepted on this site, they need to explain in more detail how the answer fits each part of the riddle. – Gordon K Feb 3 '16 at 11:11

Can you be?

Swift

Little 'bout my age: far from that of B

First appeared at 2014, far compared to other answers as well

Yet in my syntax, you will find some C

Swift is in C-Family PLs

The way I treat vars, that is much like D

similar named variables, and handled closely mutable/immutable

I do take objects, but I'm not like E

E: def myFnc(name) :any /// Swift: func myFnc(name: String)

If it starts with F, you'll know it's not me

with your clue that "First letter is important" applies for Swift. variables are like Bool, String, Int so they are always starting capitilized. Declarations like UIView, and starting with NS (ios tho) are starting capital.

My first attempt at a puzzle here. Here it goes:

My guess is that you are:

Little 'bout my age: far from that of B:

B was developed in 1969. Rust was developed in 2010. So it is way newer than B.

Yet in my syntax, you will find some C:

Rust uses curly brackets like C. Also all keywords are typed in small caps.

The way I treat vars, that is much like D:

This one I'm not too sure about :)

I do take objects but, I'm not like E:

Not this one as well.

If it starts with F, you'll know it's not me:

Can you be?

Little 'bout my age: far from that of B

Since B appeared in 1969, and Eiffel in 1986.

Yet in my syntax, you will find some C

As with most structured languages, some C syntax is in there.

The way I treat vars, that is much like D

Object-oriented handling of vars in D is very similar to C++/Java, which in-turn were influenced by Eiffel.

I do take objects, but I'm not like E

Eiffel, (somewhat ironically) treats objects very differently from E.

If it starts with F, you'll know it's not me

A play on the position of F and E in the alphabet. Since the first letter is important, Eiffel would not only not start with F, but be alphabetically next to it.

• Great answer, and welcome to Puzzling.SE! We hope to see you around here more c: – Deusovi Feb 4 '16 at 6:52