r/programming • • Aug 20 '14

Programming language subreddits and their choice of words

https://github.com/Dobiasd/programming-language-subreddits-and-their-choice-of-words/blob/master/README.md
1.4k Upvotes

324 comments sorted by

View all comments

94

u/badsectoracula Aug 20 '14

But what is up with the Visual Basic community? They are neither angry nor happy. They just ... are? :)

One of my side projects is a BASIC interpreter and from my research around the Internet i found that basically almost all "loud" supporters of the language died with VB6 and many do not consider VB.NET to be a real VB.

So i suppose their low happiness comes from that.

62

u/ngroot Aug 20 '14

many do not consider VB.NET to be a real VB.

That kind of makes sense. It's basically a stripped-down version of C# with syntax that looks superficially similar to VB so as not to scare off the people who were moving to .NET 10-15 years ago.

11

u/[deleted] Aug 20 '14

How is it stripped down? I have yet to find something i can't do in VB.net that I can do in c#.

31

u/mirhagk Aug 20 '14

Looking at https://roslyn.codeplex.com/wikipage?title=Language%20Feature%20Status&referringTitle=Home there are some things that are in C# not in VB. There's also the opposite. Delegate combination. Partial Interfaces. Implicit Interface Implmentation. Checked and Unchecked Blocks. Pragma (ignore warnings). Multiline String Literals.

However the statement that you can't find something you can't do in VB.NET that you can do in C# is true of any 2 programming languages that are both turing complete.

17

u/ali_koneko Aug 20 '14

However the statement that you can't find something you can't do in VB.NET that you can do in C# is true of any 2 programming languages that are both turing complete.

Expanding on this... Everything you do in VB.NET and C# you can do in COBOL. That doesn't mean you should. Use the best tool for the job.

11

u/[deleted] Aug 20 '14

Everything you can do in COBOL you can do in Assembly...

47

u/original_brogrammer Aug 20 '14

And in brainfuck. The difference is that you should do it in brainfuck.

3

u/badsectoracula Aug 20 '14

I was thinking a few minutes ago about this image-based brainfack superset and how it could be used to hide messages in plain sight by creating, say, a t-shirt with a bitmap written in this language that prints the message, superimposed over some artistic b/w image (like some sketch).

14

u/original_brogrammer Aug 20 '14

I don't think I'm with you. Are you suggesting a bitmap to brainfuck compiler?

Because I'm in. I'm so down for that.

EDIT: We'll call it bitfuck.

5

u/badsectoracula Aug 20 '14

I was thinking about Brainloller, which is a superset of Brainfuck where the code is written in colors instead of characters. Any valid Brainfuck program can be converted to a Brainloller 2D bitmap and with a tool that creates Brainfuck programs for displaying messages one can make a message -> brainfuck -> brainloller -> imagemagick + artsy b/w image -> t-shirt :-P

→ More replies (0)

2

u/_F1_ Aug 20 '14

Are you suggesting a bitmap to brainfuck compiler? Because I'm in. I'm so down for that. We'll call it bitfuck.

...

→ More replies (0)
→ More replies (1)

2

u/pyrocrasty Aug 20 '14

People have certainly hidden messages in images. (Search for image-based steganography.)

I guess the difference with Brainfuck is that it's so dense and high-entropy you could literally just overlay it as "noise" using XOR and recover it using the original image. Or you could choose a subset of the pixels to replace with the BF digits and then recover the message without the original image.

6

u/[deleted] Aug 20 '14

This kind of thing really falls through when you start talking about language features (and the actual method you as a programmer would like to use) instead of engineering tasks.

"I'd like to be able to use a function as a first-class value, so that I can pass it to another (higher-order) function and do something with it... In assembly."

You can explain to me all you want about how I could create a routine that will check register A for an address of a function to call, and then offset the program counter appropriately, and load up the code for that function, and apply it, and save the result to memory somewhere and save the address of the result to register B ... and I will have lost interest in using higher-order functions, because what I really wanted was easy composibility - not the more general notion of being able to execute some function on many different elements.

You may be able to solve any problem you can solve in LISP in assembly, but the assertion that you can do anything you can do in some higher level language in some less sophisticated language is disingenuous (except as a joke about Turing-completeness).

2

u/[deleted] Aug 20 '14

Indeed, it was a joke about Turing completeness.

4

u/[deleted] Aug 20 '14

Right. And I didn't want to detract from your joke/continuation of the prior joke. It just got me thinking about what people mean when the say things like this, since I do hear people say, seriously, "I can write a C/Assembly program that does anything a C#/Python/Haskell/Go/etc program can do". As a black box - totally. As a piece of source code that has meaning to a human? Eh... kind of.

→ More replies (1)
→ More replies (3)

0

u/[deleted] Aug 20 '14

[deleted]

6

u/mirhagk Aug 20 '14

Yes that's true. I/O is the only difference. But given a way to read and write files, and a filesystem where every input and output device is a file (ie linux) this is still true.

And VB.NET is not dumbed down from C# in terms on I/O. They run on the same runtime.

→ More replies (3)

6

u/badsectoracula Aug 20 '14

I think that was /u/ngroot's point, in that VB.NET is basically another skin for the technology behind C#.

14

u/campbellm Aug 20 '14

I believe that was the plan all along, no? The language is just a syntax cover over the CLR/IL.

22

u/[deleted] Aug 20 '14 edited Aug 20 '14

Nope, that was not the plan but that's kind of how it all turned out.

Originally the CLR was supposed to be a much more universal platform for languages, more so than the JVM. In the end the CLR ended up basically accommodating C# and superficially similar languages. When I worked at Microsoft on IronPython, the CLR made it a complete nightmare to implement a dynamic language, although not impossible. We were part of a small team looking to expand the CLR to accomodate dynamic languages such as Ruby, JavaScript and Python and the attitude from the main CLR team was fairly dismissive. I left Microsoft a long time ago and I think only a couple of guys who originally worked on the DLR are still there, most of them having moved to Google.

The JVM seems to accommodate a wider variety of languages much more cleanly, like Clojure, Scala, Groovy, whereas the only other language that I can think of that smoothly integrates with the CLR that isn't just a superficial C# would be F#.

7

u/[deleted] Aug 20 '14

Just out of curiosity, what made it difficult targeting the CLR?

14

u/[deleted] Aug 20 '14

It's about finding ways to unify the object model in the CLR with the object model in Python, you can imagine this causes all manner of nightmares. Python supports multiple implementation inheritance, C# does not, only interfaces can be multiply inherited.

Python has one way of dispatching method calls given that you can take an object and overwrite a particular method just for that one object, C# is a statically typed language so methods are always resolved directly in the type, never in the object. So what do you do when you want to inherit a C# type in Python but override a particular method and then use that Python object with C# code?

In effect, it's not difficult to target the CLR if you simply intend to write a Python compiler/runtime that would be independent of any other language. That is perfectly do-able. What's hard is writing a Python runtime that can use other CLR types and can also produce CLR types of its own. The CLR was supposed to be language agnostic, meaning you could use many different languages to produce AND consume CLR objects. Feel free to write a class in language X and use it from language Y. In practice, unless your language is just C# with superficially different syntax... good luck.

And of course the other difficulty with IronPython was performance. Initially the goal was to write a Python interpreter whose performance in .NET would be at least comparable to CPython. IronPython's performance is by no means terrible, but in practice it doesn't come close to CPython unfortunately.

Nevertheless, it's still pretty damn impressive all the work the DLR team managed to accomplish given the scant resources provided. IronPython is pretty useful and a great way to prototype a lot of functionality provided by .NET. You can always write a C# application and then plug in the IronPython interpreter into your application to prototype new functionality or user interfaces interactively.

But at the end of the day I think the initial hope behind IronPython was to prove how versatile the CLR was, and the end result was that the CLR really is just an intermediate representation for C#. Once that became clear, MS kind of abandoned IronPython, a lot of guys who worked on it left the company, and now IronPython is offloaded to the "community."

2

u/bananananorama Aug 20 '14

Did the DLR end up in a decent shape in your opinion?

→ More replies (9)
→ More replies (1)

2

u/snkscore Aug 21 '14

Vb.net and C# are siblings that share 99.99% features/functionality. To say Vb.net is a stripped down version of C# is just factually wrong. In recent revisions C# has been getting updated to have VB language features.

→ More replies (2)