Go Down

Topic: Opine: Shift key shouldn't be used to program (Read 2610 times) previous topic - next topic

mattlogue

This is not a technical question.

I just want to say I've been using visual BASIC for quite a while and find it easier to use. VisuaL basic didn't care that I did that. It thinks both were the same. In fact, that allowed me to correctly spell variable and object names. IDE could, theoretically, have a case insensitive mode. There is no logic to what object names are capitalized and not. Take for example the Serial() and digitalWrite(). Look at the ref section on this www, it spells it "serial"; not "Serial". C++, like it or not, is case sensitive. Not a unix fan.

What are your thoughts?
Just because I live in the states don't mean I care

groundFungus

#1
Jan 18, 2018, 09:23 pm Last Edit: Jan 18, 2018, 09:24 pm by groundFungus
By convention, I guess, classes are capitalized, functions and variables are not capitlized.  For Arduino, Serial is a class so it is capitlized,  digitalWrite() is a function so is not.  And constants are all caps.

Quote
What are your thoughts?
C++, like it or not, is case sensitive. 

GrooveFlotilla

Quote
What are your thoughts?
I think this is not the right section of the forum for this topic.

Now, about your thoughts. When was the last time you programmed an eight bit microcontroller in Visual Basic?
Some people are like Slinkies.

Not really good for anything, but they bring a smile to your face when pushed down the stairs.

slipstick

I think that when trying to program any device I will learn how the device is programmed and then use that knowledge to get it to do the things I want doing.

I will not waste my time wishing that the universe works differently from the way it actually works.

Steve

pert

C++, like it or not, is case sensitive.
That's correct, and Arduino code is C++ so it's also case sensitive. Making Arduino code fundamentally different from C++ would be a huge mistake. A common misconception is that there is an "Arduino language". That's a pet peeve of mine because the fact that Arduino uses a standard professional programming language is a huge asset. You can learn with Arduino and later use the same knowledge in any other programming work. There are a few things the Arduino IDE does for you behind the scenes but nothing anywhere near as significant as ignoring case.

Programming requires precision. There's no way around that. If someone isn't disciplined enough to use consistent capitalization they're not going to have any success with Arduino anyway.

Look at the ref section on this www, it spells it "serial"; not "Serial". C++, like it or not, is case sensitive.
That's a good point. I have noticed that also and it's one of the things on my list to look into changing. In fact it has already been mentioned in passing here:
https://github.com/arduino/reference-en/pull/271#issuecomment-347312779

outsider

So, you're just throwing away 26 characters from your repertoire?

BulldogLowell

#6
Jan 19, 2018, 12:06 am Last Edit: Jan 19, 2018, 12:07 am by BulldogLowell
This is a nonsense post

Quote
I don't like the rules of the game are played, so let's open a conversation and see if anyone agrees
The rules are the rules and no matter of opinion posted here will change that, so maybe just take your ball and go home...

your alternatives (short of inventing your own language or creating your own compiler)?

1) find a microprocessor/community that is programming in Visual Basic (yep, there are ways to do it)
2) talk to the C++ standards committee and tell them you want C++ to be more live Visual Basic; see how that goes.
3) learn something new.





GoForSmoke

This is not a technical question.

I just want to say I've been using visual BASIC for quite a while and find it easier to use. VisuaL basic didn't care that I did that. It thinks both were the same. In fact, that allowed me to correctly spell variable and object names. IDE could, theoretically, have a case insensitive mode. There is no logic to what object names are capitalized and not. Take for example the Serial() and digitalWrite(). Look at the ref section on this www, it spells it "serial"; not "Serial". C++, like it or not, is case sensitive. Not a unix fan.

What are your thoughts?
That Basic sucks once you get past beginner level. I did work in Basic on and off for over 10 years because so many people who never wrote code were convinced that Basic was universal, etc.

The fact is that most of it would have gotten done quicker in C or another language I knew.

VB is Basic with a lot of C/C++ features added but it still sucks once you know better languages.

You could use macros in C to rename those bothersome got-caps-in-em names. The complier will replace the easy-to-spell words you want with the ones it needs every time you compile. Make an include file of macros and use it in every project you want to have your own versions.

And lastly, all lowercase code will be harder to read quickly than code with well-placed caps. Spend real time debugging code written both ways and that should become clear. And that goes for whitespace, crowded code will burn you out quicker.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Tasking: techniques make the trees, the sketch is the woods.
See the woods and the trees, comment both.

Robin2

#9
Jan 19, 2018, 12:49 pm Last Edit: Jan 19, 2018, 12:52 pm by Robin2
VB is Basic with a lot of C/C++ features added but it still sucks once you know better languages.
I don't think that comment has any greater value than the OP's wish for a case-insensitive version of C++. It's a very long time since goto lineNumber was standard Basic practice - it probably never was with VB.

If VB gets the job done and the programmer is happy with it -- end of story.

And most of the "visual" stuff is much easier to do with VB (or VC#) than it is with Java + Swing or Python + Tkinter - especially if you don't use them regularly. I got fed up with Swing and Tkinter and now I do all my visual stuff with HTML and CSS. If I was using Windows I would probably use VB.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

ardly

Why not go the whole hog and instead of getting rid of upper case characters just ignore all non-whitespace characters.

The language 'Whitespace' is programmed using just spaces, tabs, and line feeds.
"Facts do not cease to exist because they are ignored" - Aldous Huxley

GoForSmoke

It's a very long time since goto lineNumber was standard Basic practice - it probably never was with VB.

If VB gets the job done and the programmer is happy with it -- end of story.
MY dislike of Basic stems from the way it writes, which is fine for dweebs. VB is a half-step better.

I'm not in love with C/C++ but it will do what I want so far.

Where did you stand in that 1st language to teach beginners thread?
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Tasking: techniques make the trees, the sketch is the woods.
See the woods and the trees, comment both.

GoForSmoke

Why not go the whole hog and instead of getting rid of upper case characters just ignore all non-whitespace characters.

The language 'Whitespace' is programmed using just spaces, tabs, and line feeds.

How do they know who won the obfuscated code contest?
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Tasking: techniques make the trees, the sketch is the woods.
See the woods and the trees, comment both.

GoForSmoke

#13
Jan 19, 2018, 07:51 pm Last Edit: Jan 19, 2018, 08:03 pm by GoForSmoke
Look at the ref section on this www, it spells it "serial"; not "Serial". C++, like it or not, is case sensitive.
The Arduino Reference can be linked to in the LEARNING pulldown menu of the green bar at the top of the Forum page you are viewing. It's between HOME and SUPPORT. The section on Serial is linked to from that page. Open to the reference when you have the Arduino IDE open and you can copy and paste from site to project.

The Arduino.cc main site is loaded with material and links to take you from start to being competent with microcontrollers. If you want it, it is a great free hyperlinked manual for you.

There are many code examples built into your IDE between the tutorials and libraries. There are more dropped onto the forum and in the archives from forum members, browse on what you want to know, the forum is a huge resource of questions and answers. Look for threads with the word SOLVED in the title. Thing is, we all use those caps. You want the goods, take it in stride.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Tasking: techniques make the trees, the sketch is the woods.
See the woods and the trees, comment both.

Henry_Best

Why not go the whole hog and instead of getting rid of upper case characters just ignore all non-whitespace characters.

The language 'Whitespace' is programmed using just spaces, tabs, and line feeds.
I can't get my Whitespace programs to compile. What am I doing wrong??

Go Up