I agree, using
was probably a poor choice given it already has a couple of definitions. A typedef
would be a better choice, but then again my first languages were C and C++ so I am biased.
Keith Badeau
Posts
-
The new GOTO Statement? -
Missed Opportunity for Easter EggIn C++ you can override operators inside of a class.
class foo
{
private:
int num;public:
foo* operator=(int i) {
this->num = i;
return this;
}
// ...
};I believe the example is syntactically correct and it is a very contrived an arbitrary example. Numbers cannot be overloaded (In Scheme maybe?) and new operators cannot be created that do not already exist. In C operators cannot be overloaded.
-
Missed Opportunity for Easter Egg:laugh: :thumbsup:
-
Extreme Artificial IntelligenceThat person would still be aware of self. He or she would just be confused ;).
-
Extreme Artificial IntelligenceI believe there are aspects of a biological organism that just cannot be fully replicated in electronics. We may get to the point where CPUs and software can replicate the processing power of a human brain (like one post says: we are as close to that as earth is to the edge of the universe) but I don't think it would ever be "alive" or aware of its self. Of course, this is my non-professional opinion so take it with a grain of salt. This is indeed a very interesting and thought-provoking post.:thumbsup::thumbsup::thumbsup::thumbsup::thumbsup:
-
Thats why i hate c++I started C programming in Borland's Turbo C/C++ compiler :wtf:. I didn't reall start C++ until Microsoft's Visual C++ v4.0 :confused: :wtf: :mad:. I love C++:rose: but after learning other languages and delving into functional programming, I can see why some people might hate it. Interesting post, by the way.
-
Are there reasons for beginner programmers to learn C ?I agree with you. It has taken me a long time to actually use the STL and the string class. My thought was the same as yours--I want to know what is going on underneath. I've since gone on faith that a vector is a decent replacement for an array and std::string is efficient enough (storage wise). Still, if I'm writing something that handles millions of objects I'll probably write something specific to the task rather than grab a vector or list or whatever (though I do now use them quite often for simpler cases). I know some people would disagree but it is just my opinion and my method. I first toyed with BASIC on my Commodore and later on jumped right into C and then C++. I hate to admit that it was after I learned to program that I actually learned that designing the program was an important step before I jump in an start hacking away. I've been learning everything in a backwards manner ever since I started. Right now I'm going back to the basics and studying OOD and algorithm design and implementation. After that I plan to study some functional programming with Scheme. I am constantly trying to learn something new...
-
Are there reasons for beginner programmers to learn C ?One reason I can think of is that learning C will give you a better understanding (and appreciation, possibly) of C++ and abstraction. Understanding the underpinnings of the tools you are working with will help you write better quality code. Maintaining legacy code isn't an important reason as this to learn C or other "old" parent language. Knowing how the library objects and functions work underneath will definitely help you use them more efficiently. Besides, C++ is a superset of C with just a handful of differences. When a C program is compiled as a C++ program there are only minor tweaks that have to be made to get it to compile. The Standard Library std::string class is just an abstraction of a C style string (array of characters) and there are still loads of API functions that still use these character arrays. It'll just help in the long run to know C (in my opinion) especially if you start writing at a lower level of abstraction.
-
VS 11All in all, I think it is great especially since the Native C++ environment has been updated to mimic the .NET intellisense and color coding schemes. It is still a memory hog and now even more extraneous processes are running in the background which probably contributes to its extremely annoying load time. I learned C with Borland's Turbo C compiler and just about every piece of sample code I wanted to play with had to be ported from MS to Borland. I shouldn't complain because having to do so most likely aided the learning process. One thing I miss: Dynamic Help. In version 7.0 with the platform SDK installed the help was fantastic; I didn't have to remember rarely used API functions. I could type a few characters or hover a word and a list of help topics would "magically" appear. This was another great learning tool for me and I am still learning.
-
Quick Programming Quiz5 out of 7 here too--totally disappointing. I didn't know there was a language called pizza!!!
-
Standing desk vs treadmill deskIf you focus on other's failures you will have a slim chance of success. Motivate yourself and try not to worry about what happened to these bloggers. Most people who start off exercising stop after a certain time and never go back--just set a goal and keep at it no matter what. Well, no matter what except for injuries, then I'd go see a doctor. Other than that you are the master of your own success.
-
JavaScript Native or .NET CompilerHey thanks, I'm glad I started this discussion because I've been thinking about it for a long time and now I have a lot of solid information to help me get started on a project. It will be done slowly in my scarce spare time I'd like to create a native compiler for JavaScript. First, I know converting to MSIL or bytecode is the much easier way to go and with all this info iam well on my way. Thanks again and thanks to everyone who responded.:thumbsup::thumbsup:
-
JavaScript Native or .NET CompilerThank you for the information; I'm quite amazed that I did not run into it during my massive "JavaScript Compiler" Bing campaign. You must be able to link to and utilize the power of the .net assemblies. I think I 'll be experimenting asap. Thanks for the heads up.
-
JavaScript Native or .NET CompilerThis I know. What I am saying is I would like to see someone write a compiler (there already is an interpreter in Windows for scripting) that creates a native executable and/or a MSIL assembly. I'm talking about writing a JavaScript compiler that allows one to write their desktop applications in JavaScript. Obviously there are many components in the javaScript library that work exclusively with HTML, others with AJAX. These parts may or may not be desirable and would give a headache to the compiler engineer who was to create this "desktop compiler" for JS. But there is so much elegance and beauty in the language that I would really like to see "JS++" or "JavaScript#". Once ported to desktop usage many of the libraries would become obsolete (I would think) and a completely new language would evolve. It would most likely have to be called something else to avoid copyright infringment--just like Microsoft's version called "JScript". Pretty suttle, huh? This task is far beyond my own capabilities but I've been tinkering and using only a for loop from JavaScript and converting to MSIL (I had an elementary understanding of x86 Assembly on 16-bit machines running DOS and I am probably further away from understanding as I've ever been). Just a brute-force method to see "if i could". I plan on devoting some time to learn about compiler design and obviously I must master JavaScript and understand MSIL completely. I've digressed; my real purpose of writing this discussion was to discuss possibilities, reasons why it should or *should not* be made. Basically, I love the language but I am not a web developer or designer. I write desktop windows applications and I would really like to, more as a novelty but nevertheless a useful tool as well, code a desktop app completely in JavaScript. One more thing, I heard of a couple of languages that took the "good parts" and did away with the "bad" and the buggy and insecure of JavaScript. One was called CoffeeScript (Good Name!) and the others I don't remember. Do these run in the browser as well? They should as the are a subset of the total language. Please, I'd really like some serious feedback on this. I know it sounds crazy but isn't that what hacking is all about? Pushing things to the limit and beyond? And I don't mean malicious users I'm talking about old school hackers--programmers that made their software do things that they were told was impossible at that time. This is what it is all about for me.
-
JavaScript Native or .NET CompilerI have recently been learning JavaScript and just playing around with it. I am a C/C++ programmer from the days of DOS and am now moving into C#. I love all four of these languages but I am not a web developer so I haven't found any serious use for JavaScript. I use IronPython or PowerShell for any scripting on my machine and this would probably be the only way I would use JavaScript outside of web app development. What I would like to discuss is the possibility of a JavaScript compiler that produces either native executables or a MSIL assembly. I haven't found any compilers that actually do this (and I am not saying they don't exist only that I haven't seen any) and I would love to see JavaScript used in this way as it is a very powerful and pretty language (I am a "curly brace" programmer). The most useful in my opinion would be the "functions as first-class objects" aspect (to quote Douglas Crockford), although Lambda is being introduced in almost every popular imperative language so the benefits would be negligible. Anybody have an opinion on this? Negative and positive feedback welcome!
-
Is "binary" a language?There are 10 kinds of people in the world. Those that can read binary and those that cannot.
-
Is "binary" a language?I see what you are saying now. Good example. Braille is a language and a binary code. Doesn't matter if the encoding is read by a machine or a human it is, technically, (and, apparently, by definition) a language. I use binary quite a bit when creating flag variables, I can convert to and from, and read them as decimal (the smaller values) but I never looked at it in that light. Interesting. Impressingly articulated by the way. ;)
-
Is "binary" a language?English is a language but the letters A through Z are not. Binary in and of itself I don't think could be thought of as a language but when you refer to "binary code" that is something different, I would argue. When one says the "English language" they would be referring to the language that is constructed using the English(?) alphabet and so "binary" refers to the code but doesn't constitute a language by itself. I believe this is what you are saying. Very well put.
-
English as she is spoke.So, you have a stick up your @$$, or rather, arse, because someone used gotten in a sentence? That isn't even what he was talking about. He was talking about "had had". Go sip some tea. Pansy.
-
English as she is spoke.There's no such language as "American"--it is a dialect of English. So, therefore, "gotten", though crude, is "English". ;)