Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - Easiest Language to learn and why you wanted to learn it | |
Pages: 1 2 3Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
kitty hacker

Micro-Goomba
Level: 7

Posts: 10/14
EXP: 948
For next: 500

Since: 12-09-04

Since last post: 261 days
Last activity: 250 days
Posted on 01-26-05 09:57 AM Link | Quote
Well I finished learning VB. I was a GBA ROMHacker and making apps for it in Visual BASIC 6 but I got bored of that after about 6 months and decided to take a leap into C++ straight from VB. I mainly wanted to learn the language for GBA Coding I started to do it. I found out Wow this is really easy. So post what you though when you learned a new language. Or started to learn your first.
Lenophis

Super Koopa
Level: 44

Posts: 336/830
EXP: 584360
For next: 26925

Since: 03-15-04
From: Duluth, MN

Since last post: 4 hours
Last activity: 3 hours
Posted on 01-26-05 12:19 PM Link | Quote
This and this should be a great help in that quest. QB was my first, but it was a horrible language to begin with, and with my experience with QB, I didn't even want to know how bad VB was. So I chose C++ instead. It's not so bad if you can understand the concept of how something is done. After that, it becomes a sinch, although it still takes time. Good luck to ya. (Now, someone that has a greater understanding will say something that will probably make me look like an idiot. )
Narf
Hi Tuvai!
(reregistering while banned)
Level: 16

Posts: 10/100
EXP: 17634
For next: 2622

Since: 12-26-04

Since last post: 22 hours
Last activity: 14 hours
Posted on 01-26-05 01:05 PM Link | Quote
PHP and Visual Basic 6.0 I guess. I started learning PHP because I had a games website with over 100 (and growing) sepparate.htm pages, each with a menu on them and the same layout. So once I had to update a menu or thingie in the layout, I had to update ALL of those 100+ single files. I got air of PHP's include() and require() and learned I could put stuff on hundreds, and maybe thousands of pages which I could change by just changing one file. I got interrested (and greedy for more features for laziness, lol) and got into PHP.

As for Visual Basic, this was actually last year, when I had to make several applications at work, I said I wanted to learn VB since I was already experienced with other programming languages and it wouldn't be hard to learn, and I was right, it was one of the easiest languages ever. I already got some apps running in less than a week. I never really went on with VB though, don't really like it, especially because of the fact you need to make huge distribution packets when compiling something.
Parasyte

Bullet Bill
Level: 35

Posts: 233/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 01-26-05 11:45 PM Link | Quote
Eh, I started with scripting languages, HTML and JavaScript. Then I went on to try learning C++. The syntax was nice and similar to JavaScript, so I figured it would be an easy jump. It's just too bad the book I bought was written so badly. I didn't get much into C++ thanks to that crap. Instead I started learning MIPS assembly for N64 and PSX hacking. After I was familiar with it, I learned Visual Basic. Used it, hated it, moved on to C. Now that I know C and a hoard of assembly language, I stick strictly to those. I definitely find it easier to do a lot of things in C and assembly than it is to do the same in Visual Basic. (A good example: concatenating bytes into a 32-bit unsigned integer in VB is HELL. In C and assembly, all you need are a few shifts and bitwise ORs.)

Finally, I went back to that C++ book I was originally trying to learn with. And it really is written badly. The guy just explains things completely wrong, and doesn't even go into any detail about the subjects he discusses. In the beginning, he talking about compilers, preprocessors and linkers, but does not detail exactly what they do or why. Just a vague reference here and there, and then moves on to the next topic. It's almost as if he assumes the reader is by far familiar with all of it. If there's one author you should avoid, it's Jesse Liberty.
Dish

Spiny
Level: 38

Posts: 248/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-27-05 12:12 AM Link | Quote
I don't recall the reasons, but I started with C++ with MFC, which actually took me quite a while to get used to (MFC is sort of MS's way of making C++ more like VB -- at first it seems easier but it's actually stupid and makes things harder down the road). Anyway, I eventually broke out of the MFC nightmare and adopted more of a C/C++ mixture style. Sort of like a 'best of both worlds' setup.

I avoided VB from the very beginning... since I knew I would ultimatly need to move away from it if I wanted to make anything credible (I mean really -- outside the rom hacking world, are there any respectable VB apps? Because I sure don't know of any). Anyway... my original options were VB, C++, and I think J++ (I think it was MS's attempt as doing the Java thing -- I think it flopped bigtime) --- I'm certainly glad I picked up the C++ book. The book wasn't great, but I learned the basics and picked up the rest from online sources. Took me a few years to get comfortable... but considering what little guidance I had, I think I did pretty well.

I recommend everyone against using VB under ALL circumstances.... since no matter what project you have in mind, there are always easier and better alternatives.
Ramsus

Octoballoon
Level: 19

Posts: 8/162
EXP: 34651
For next: 1126

Since: 01-24-05
From: United States

Since last post: 39 days
Last activity: 71 days
Posted on 01-27-05 12:32 AM Link | Quote
I started with C++ and learned the basic language fairly easily on my own, and I thought this "Object-Oriented" thing made a lot of sense, so it really stuck with me even though I lost interest in C++ fairly early. When I started using Linux and started doing stuff with C, I would always tend to use the OO approach to things. It wasn't until I tried languages like Python until I started looking at and mixing other approaches. Also, it wasn't until I learned basic x86 assembly that I started to really get programming in general and really understand C.

The absolute easiest languages I've ever learned though have been PHP, Python, and Fortran 77. Fortran 77 is a small, simple language compared to a lot of today's languages, and it's really easy to pick up if you've ever learned a procedural language. I learned it mostly out of curiosity, but also there's a lot of weather research on campus, so later I might try learning Fortran 95, scientific programming, and parallel computing techniques to land a job.

Python is just really easy and simple. Just read the tutorial in the documentation and you know the language in a matter of a few hours. Lists are really nice to work with, and not having to worry about memory management is nice. Being a functional scripting language, it's also really easy to develop and test programs with a bottom-up model of development (as opposed to the well-planned top-down model taught in some beginning CS classes). The other nice thing is the large number of libraries included with the language.

PHP is just as easy as Python for similar reasons, except you use dictionary arrays instead of lists, and the syntax is different. PHP is a great glue language for the web with all those libraries, and I probably wouldn't have any interest in server-side web development if it wasn't for PHP. I'd definitely be a better Javascript programmer though.

Probably the hardest language I ever tried learning was Lisp, because it's just so different from C++ or even Python in so many ways. I never really got macros and all those fancy Lisp things that supposedly make it better than every other language. Maybe it was all those parenthesis. I might give Lisp and scheme a try again someday, but I'm just focusing on concrete math for now.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3046/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 01-27-05 05:15 AM Link | Quote
The easiest I learned was VB, which is why I learned it. I tried to get into C a few times, but I always had problems with confusing documents and buggy compilers. (And you have to admit, some parts of the API, as well as case-sensitivity in general, are just so stupid. ) It wasn't until I got really familliar with the API, found some good documents, and came across MinGW that I really managed to get anywhere with C. (Though I still need to find a resource editor. )
Dish

Spiny
Level: 38

Posts: 249/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-27-05 05:43 AM Link | Quote
Originally posted by HyperHacker
(And you have to admit, some parts of the API,


The API is not part of C. It's part of Windows. You can't chalk that up as a downfall of the language.


as well as case-sensitivity in general, are just so stupid. )


Case insensitiviy is what's stupid. 'c' and 'C' are two clearly different characters and should be treated as such... not only by languages and compilers, but by EVERYTHING computer related or otherwise -- including username/passwords, webpage URLs, and preferably filenames (although Windows doesn't seem to care about case... which really bugs me). If there's no difference between cases, why bother having two cases at all?

edit:

disclaimer: imo

XD


(edited by Disch on 01-26-05 10:36 PM)
creaothceann

Red Paragoomba
Level: 11

Posts: 1/50
EXP: 5903
For next: 82

Since: 01-27-05

Since last post: 21 hours
Last activity: 21 hours
Posted on 01-27-05 05:46 PM Link | Quote
I started with Batch, then QBasic, then Pascal (which is the best to learn, IMO).

Originally posted by Disch
Case insensitiviy is what's stupid. 'c' and 'C' are two clearly different characters

"Btn_CopyTxt" and "btn_copytxt" clearly refer to the same thing. Case sensitiviy is a great source of possible misunderstandings.

Sure, for the compiler it's easier to distinguish, but a compiler should make the programmer's life easier (when possible), not the other way around.
Gavin

Fuzzy
Rhinoceruses don't play games. They fucking charge your ass.
Level: 43

Posts: 427/799
EXP: 551711
For next: 13335

Since: 03-15-04
From: IL, USA

Since last post: 13 hours
Last activity: 13 hours
Posted on 01-27-05 05:54 PM Link | Quote
i beleive Disch is talking in computer terms. 'A' is entirely different than 'a' to a computer. I don't see any reason why people would be angry with case insensitivity.

You're programming a very sophisticated technical machine, you're not writing a not to a friend in school . It would seem most logical that many conventions stay true to what a computer essentially is and how it interprets data, instead of obscuring it.
creaothceann

Red Paragoomba
Level: 11

Posts: 2/50
EXP: 5903
For next: 82

Since: 01-27-05

Since last post: 21 hours
Last activity: 21 hours
Posted on 01-27-05 06:47 PM Link | Quote
Originally posted by Gavin
It would seem most logical that many conventions stay true to what a computer essentially is and how it interprets data, instead of obscuring it.

Then how do you explain that programming evolved to higher languages and OOP?

About the obscuring: yes. But here it's about how we write our source code, which is a human thing.

Another example. Surely you'll agree that using variables named like a1, a2, a3 etc. is not good. The purpose of the variable is not in its name, so you have to remember it. Same with Btn and btn.
Dish

Spiny
Level: 38

Posts: 250/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-27-05 10:11 PM Link | Quote
Originally posted by creaothceann

"Btn_CopyTxt" and "btn_copytxt" clearly refer to the same thing.


They might... but they're 2 different strings. Having 2 different strings refer to the same variable is not only confusing, but sloppy. Even if the language was case insensitive it would be bad practice.

And besides... case sometimes does play a major role in distinguishing between types. For example in C, I often do:

HWND hWnd;

"HWND" being the variable type, "hWnd" being the name of my variable (in hungarian notation... the preceeding 'h' indicates that this variable is a handle, and 'Wnd' is the name of the variable). I also often do HWAVEOUT hWaveout, HINSTANCE hInstance, MSG msg, etc.


Case sensitiviy is a great source of possible misunderstandings.


I can't even comprehend how you figure this. How does referring to the same variable the same way all the time create misunderstandings? If anything... referring to the variable by 100 different variations of the name creates misunderstandings.

Saying 'b' and 'B' should be treated as the same character by the compiler is like saying a space and an underscore should be treated the same: nonsense. Two different characters with two different purposes and two different uses. There's absolutly no reason why they should be treated the same -- they're completely different!

Case matters in English when you write things. Even in your post, you had lowercase letters except where you started a sentence, where you put a capital letter. This is the syntax of English -- where capital letters and lowercase letters have different meanings. SurE yOU coUlD tYPe A SenTenCE LiKe ThIS... and yeah I would even be able to understand it -- but that's not proper English. You'll never see writing like that in a published book... or in a newspaper... or anywhere the text has been read and "edited" or comfirmed.

C is no different... and should be no different. If a variable name is "MyButton"... the variable name is "MyButton". Not "mybutton" or "MYBUTTON" or "mYbuTtoN" -- those are all different. Sure you might be able to understand that they're trying to refer to the same variable (although, you can't really be sure -- like my HWND/hWnd example)... but it's no proper C. You'll never see code like that in any published program... or in any WIP source... or anywhere the code has been read and "compiled" or confirmed.


Sure, for the compiler it's easier to distinguish, but a compiler should make the programmer's life easier (when possible), not the other way around.


No, see... the job of the compiler is to take the code that you write and compile it. It's not supposed to guess what you're trying to say and compile an interpretted version of it. You're supposed to tell it exactly what you want. Next thing you know you'll be saying it should be doing spell check errors and that "button" and "buton" are clearly trying to reference the same variable. For heaven's sake I hope it never comes to that.

If the variable name is "var"... refer to it that way. If you don't want to refer to it that way... change the variable name.
Parasyte

Bullet Bill
Level: 35

Posts: 238/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 01-27-05 11:39 PM Link | Quote
Disch is right, you know.
Here'es an excerpt from that C++ book I have been complaining about. (The book is not ALL bad. This is even an example of something good which can be quoted from it.)

"C++ is case sensitive. In other words, uppercase and lowercase letters are considered to be different. A variable named 'age' is different from 'Age', which is different from 'AGE'.

"Some compilers allow you to turn case sensitivity off. Don't be tempted to do this; your programs won't work with other compilers, and other C++ programmers will be very confused by your code."



To bring Disch's English analogy back into the equasion, you could think of variable and function names (among others) as proper nouns. Any time you use a proper noun in the English language, it is capitalized. Similarly, any time you use a "proper noun" (variable or function name, etc) in C++, you must use the same exact case that the name was defined with. A variable named 'Jim' won't answer to 'jim' or 'JIM'. That's because you've only declared 'Jim'.

That aside, case is usually used to make the code more readable. For example, 'myFirstDog' is clearly three words mashed together to form a single name. If you were to name a variable in that form, you would not go around your source writing 'myfirstdog' everywhere else; that HARMS the readability which you set out to pretty-up in the first place.


(edited by Parasyte on 01-27-05 02:41 PM)
(edited by Parasyte on 01-27-05 02:41 PM)
creaothceann

Red Paragoomba
Level: 11

Posts: 3/50
EXP: 5903
For next: 82

Since: 01-27-05

Since last post: 21 hours
Last activity: 21 hours
Posted on 01-28-05 12:58 AM Link | Quote
Originally posted by Disch
Originally posted by creaothceann

"Btn_CopyTxt" and "btn_copytxt" clearly refer to the same thing.


They might... but they're 2 different strings. Having 2 different strings refer to the same variable is not only confusing, but sloppy. Even if the language was case insensitive it would be bad practice.

And besides... case sometimes does play a major role in distinguishing between types. For example in C, I often do:

HWND hWnd;

"HWND" being the variable type, "hWnd" being the name of my variable (in hungarian notation... the preceeding 'h' indicates that this variable is a handle, and 'Wnd' is the name of the variable). I also often do HWAVEOUT hWaveout, HINSTANCE hInstance, MSG msg, etc.

I'm not denying that using two strings for the same variable is bad, and reduces readability. But IMO treating it as two variables and maybe even compiling without error is the worst way to go.

Btw. I'm doing the same thing with the preceding type character. But Borland has defined a lot of data types with a preceding 'T', while I like a lowercased 't'. In C I'd have no choice but to use the uppercased version.

Originally posted by Disch

Case sensitiviy is a great source of possible misunderstandings.


I can't even comprehend how you figure this.

Because you can declare variables that are declared somewhere else with a slightly different upper-/lowercase combination.

Originally posted by Disch

Sure, for the compiler it's easier to distinguish, but a compiler should make the programmer's life easier (when possible), not the other way around.


No, see... the job of the compiler is to take the code that you write and compile it. It's not supposed to guess what you're trying to say and compile an interpretted version of it. You're supposed to tell it exactly what you want. Next thing you know you'll be saying it should be doing spell check errors and that "button" and "buton" are clearly trying to reference the same variable. For heaven's sake I hope it never comes to that.

If the variable name is "var"... refer to it that way. If you don't want to refer to it that way... change the variable name.

No, I'm absolutely not for this guessing. But that's what the case-sensitive compiler does when it encounters a wrongly-cased variable: It guesses that it must be a new variable. I just don't like that way of problem-solving.
Dish

Spiny
Level: 38

Posts: 251/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-28-05 01:35 AM Link | Quote
Originally posted by creaothceann

I'm not denying that using two strings for the same variable is bad, and reduces readability. But IMO treating it as two variables and maybe even compiling without error is the worst way to go.


I'll agree it's bad practice to have case being the sole deciding factor of different variables. Like:

int Bob;
int bob;

That's a bad move... I'll agree. However it can have practical applications like:

MSG msg;

'MSG' being the type and 'msg' being the object. However if you even don't like that -- that's understandable. I mean neither method is immune to bad coding practices.

But the fact of the matter is... uppercase letters and lowercase letters are different. They are... it's not disputable. They look different... they have different contexts, and they're represented differently by the machine. There is no reason why the machine should treat 2 different characters like they're exactly the same... it just doesn't make sense.


Btw. I'm doing the same thing with the preceding type character. But Borland has defined a lot of data types with a preceding 'T', while I like a lowercased 't'. In C I'd have no choice but to use the uppercased version.


If it really bugs you that much you could re-typdef them. But yeah... you should have to use the type as spelled by the compiler. That's only logical.


No, I'm absolutely not for this guessing. But that's what the case-sensitive compiler does when it encounters a wrongly-cased variable: It guesses that it must be a new variable. I just don't like that way of problem-solving.


It's not guessing at all. "abc" and "ABC" are as different to the compiler as "abc" and "xyz". Upper and lowercase characters are compeltley different.

Case insensitive compilers likely take your token, and instead of using it as you type it*, they convert it to lowercase before they use it so that all case is removed.

* When the source of your program isn't being used 'as you type it'... the compiler is guessing what you meant to type rather than using what you actually typed ... ie: guesswork/interpretation. Like I said before... that's not the compiler's job -- it's your job to tell the compiler exactly what you want to be done.

Removing case is one step away from saying underscores should be optional in token names. Like saying "this_is_a_var" is the same as "thisIsAVar". I could use all the same arguments you're using to push this type of logic.

In fact... hell... let's stop putting semicolons at the end of instructions too. The compiler should be able to tell where I want my instruction to end. And you know what? When I do:

int myvar;
int* myptr = myvar;

It should know that I mean to point to myvar... it shouldn't annoy me with silly compiling errors... it should be able to figure out what I meant to type and adjust it for me. That would "make my life easier".


You can see where I'm going with this. The compiler should take what you type exactly as you type it... it shouldn't have to guess as to what it thinks you mean. Programming is an exact science... it's not guesswork.
Squash Monster

New Age Retro Hippie
Togateiru Fohku Kohgeki!!
GRUNGE no HAMSTER otona bite
Peace love and turnpike!

Level: 40

Posts: 521/677
EXP: 430507
For next: 10802

Since: 03-15-04
From: Maryland (of the Country Between Canada and Mexico)

Since last post: 5 hours
Last activity: 5 hours
Posted on 01-28-05 01:38 AM Link | Quote
Most people who like case insensitivity are thinking of something like VB's holding-your-hand-for-you IDE that fixes your capitalization and makes it match whatever you declared it as. I actually think it'd be a nice feature to have in an IDE with some slight modification: select a variable and add it to a special autocaps list, and it that word automatically assumes the capitalization you gave it as long as you're working on something within that variable's scope. Heck, with a setup like this, I think even the whole thisIsAVar and this_is_a_var being the same idea would be pretty cool.

Bad for a compiler, good for an IDE. Compilers shouldn't have to do any more special interpretation than ignoring whitespace. IDEs should do as much as their creators can manage.

The easiest language I learned was HQ9+. I learned it because I was reading about esoteric programming languages, and figuring out what HQ9+ is and learning it are about the same thing. See, HQ9+ has four commands. H prints "Hello World!", Q prints the program's source code, 9 prints the entire text of 99 Bottles of Beer on the wall, and + adds one to the accumulator. Congrats, you know HQ9+!

The easiest real programming language I learned was Java. I found TI83 BASIC and VB to be as easy as using a hammer, but Java feels as easy as using one of my own arms (well, most of the time).


(edited by Squash Monster on 01-27-05 04:44 PM)
(edited by Squash Monster on 01-27-05 04:45 PM)
Parasyte

Bullet Bill
Level: 35

Posts: 239/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 01-28-05 01:58 AM Link | Quote
Originally posted by Squash Monster
I actually think it'd be a nice feature to have in an IDE with some slight modification: select a variable and add it to a special autocaps list, and it that word automatically assumes the capitalization you gave it as long as you're working on something within that variable's scope. Heck, with a setup like this, I think even the whole thisIsAVar and this_is_a_var being the same idea would be pretty cool.


I disagree! Compilers and IDEs are fine just the way they are. Though I'm a bit peeved about the IDEs available which do attempt to write your code for you (to some degree) because that's approaching a new level of laziness. Perhaps it's not so much laziness as it is lack of a programmer's love of programming. The more recent IDEs such as those seen in the Microsoft .NET suite are getting near to the point where the IDE wants to write your whole program for you. And that's because of bad ideas like the one I just quoted.
Personally, I'm perfectly happy using a standard text editor with little more than syntax highlighting. I don't need an IDE to guess which variable or function name I am in the process of writing; I want to write what I want to write, not what the IDE believes I want to write.

Oh hell with it! As long as I'm not forced to use such awful IDEs, I will be fine. What I fear is that some job I may get in the future will be SO influenced by these ... design flaws ... that the company will insist every employee use those products. That just means I will end up declining the position in favor of a less stupid coporation.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3062/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 01-28-05 02:22 AM Link | Quote
Para: Don't get me wrong, I enjoy writing my code in just plain Notepad much more than M$'s crappy IDE. (I should actually get around to looking at Textpad, though. ) It does have one or two nice features though, such as telling you the parameters of a function as you type it, and the type of a variable upon request.

Originally posted by Disch
Originally posted by HyperHacker
(And you have to admit, some parts of the API,


The API is not part of C. It's part of Windows. You can't chalk that up as a downfall of the language.

True, but in VB you don't need to deal with a lot of the stupidity. For example you need never touch a lot of window-related functions unless you really need to change how they work, and most of the various obscure types that are nothing more than a renamed integer are just declared as Long. I'm not saying C is bad because of the API; I'm saying VB is (in this way, anyway) good because of how it handles the API.


not only by languages and compilers, but by EVERYTHING computer related or otherwise -- including username/passwords, webpage URLs, and preferably filenames (although Windows doesn't seem to care about case... which really bugs me). If there's no difference between cases, why bother having two cases at all?

Passwords are case-sensitive because it adds security. Usernames often aren't, and when they are it's usually just because case-sensitive compares are easier to write. URLs and filenames being case-sensitive is a huge pain in the ass, IMO; always having to rename files from .JPG to .jpg and try to remember the capitalization of some obscure system file.

Creaothceann has the right idea here. It's obvious that btnGetFileName and btnGetFilename refer to the same thing. You'd just be stupid to create two different buttons with both of those names. Also, I like how you claim that referring to the same variable the same way all the time eliminates confusion. That's great if you refer to it the same way all the time. What happens when you have to work with someone else's code and they've used a different naming convention? Why a little thing called confusion!

Also, with your HWND/MSG examples: Those shouldn't even be types. Both are just integers anyway. Like I said before, in VB, both would simply be declared as Long, and it works fine. Obviously a variable named hWnd is a window handle and one named iMsg is a message, we really don't need whole new type definitions just for them.
Dish

Spiny
Level: 38

Posts: 253/596
EXP: 355646
For next: 14801

Since: 03-15-04
From: Disch

Since last post: 18 days
Last activity: 18 days
Posted on 01-28-05 03:05 AM Link | Quote
Originally posted by HyperHacker

True, but in VB you don't need to deal with a lot of the stupidity. For example you need never touch a lot of window-related functions unless you really need to change how they work, and most of the various obscure types that are nothing more than a renamed integer are just declared as Long. I'm not saying C is bad because of the API; I'm saying VB is (in this way, anyway) good because of how it handles the API.


I guess I don't know VB well enough to comment here. But it seems to me that VB just front-ends a lot of the API work. There's nothing stopping you from doing that with C -- I mean you could write a library to simplify the window stuff -- although aside from actually creating the window... I really don't see what's so complicated about the API (and even window creating isn't that hard when you get the concept).


Creaothceann has the right idea here. It's obvious that btnGetFileName and btnGetFilename refer to the same thing. You'd just be stupid to create two different buttons with both of those names.


Yes but to the compiler, they're 2 completely different names. It's obvious that "btnGetFileName" and "bnGetFileName" are trying to refer to the same variable too... but they're completely different token strings.

If you mean to reference the variable... type the actual variable name. It's not the compiler's job to figure what you meant to type... that's your job. The compiler doesn't write the code... you do.


Also, I like how you claim that referring to the same variable the same way all the time eliminates confusion. That's great if you refer to it the same way all the time.


What do you mean "if". You HAVE to. That's the whole point of using variable names.... it associates a token with a variable. You can't call a variable "openFile" in one part and "fileOpen" in another part... the compiler won't know what the hell you're talking about. They're 2 different tokens.

"var" and "VAR" are two different strings. They're 2 different tokens. A kindergartener could see the difference.... so does a compiler. There is no reason why two different tokens should refer to the same thing --- it just doesn't hold up to logic.

The compiler shouldn't "know what you mean" by something. You should tell it exactly what you mean. That's what programming is. If you don't like being specific... this is the wroooooooong area to be in.


What happens when you have to work with someone else's code and they've used a different naming convention? Why a little thing called confusion!

Deal with it. If you can't reuse variable names as they're typed then you must not be a very good typist.

That's like saying if I take someone else's source and I don't like their variable names... so I just use my own and expect the compiler to know what I mean by that. That's ridiculous!


Also, with your HWND/MSG examples: Those shouldn't even be types. Both are just integers anyway.


MSG is a data structure, not an integer.

As for HWND, HINSTANCE, etc being variable types... yeah it is kind of stupid... but typically things are typedefed with the intention that they may not be the same size on a different platform. For example, on 64-bit Windows, HWND might not be 32-bits anymore... it may be 64. If you coded something using 'long' in place of HWND, it could have a conflicting variable size.

But yeah... some of the things (like WPARAM/LPARAM/HANDLE/etc) are pretty stupid... no argument here. I still use them as the context demands though.
dan

Snap Dragon
Level: 43

Posts: 372/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 01-28-05 03:28 AM Link | Quote
Hyperhacker, if you put enough energy into learning how to create windows and stuff like that under C as you put into complaining about creating windows and stuff like that under C you'd have learned it by now.

Anyways, for me, one of the easiest languages I had learned was Java. Probably because I was familiar with using OOP in programming.

The first language I ever attempted to learn was Sinclair BASIC on my trusty ZX Spectrum +2. I didn't get very far as my only reference was a half ripped copy of the ZX Spectrum 48k programming manual. Which was missing all the basic stuff like variables (presumably from the missing parts ). I did manage to make a rather horribly coded text adventure though, without any usage of variables whatsoever. It sucked.
Pages: 1 2 3Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - Easiest Language to learn and why you wanted to learn it | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.014 seconds.