|
True. But I've found that to be an exception. Most often tests for equality test for a certain (constant) value, whereas tests between actual variables check the order, i. e. they use < or > rather than == . I've been using Yoda conditionso for more than 20 years, and I can't recall the last time I couldn't apply it. It happens, but it's extremely rare.
|
|
|
|
|
Most of the problems you describe are the reason why coding guidelines and code reviews exist. If you choose not to use coding guidelines, or don't bother to hold reviews to ensure guidelines are followed, many of these problems simply can't be avoided: a language definition can't stop a programmer from calling a variable i rather than, more descriptively, row_index . Only guidelines and reviews can achieve that!
Some specific comments:
3) As pointed out above, variable naming and code documentation cannot be enforced by a language.
4) I disagree: Strong typing helps the compiler (or interpreter, whatever) to decide whether a given statement is ok or maybe a typo. It helps the compiler find many errors of the types you earlier described! The main reason for strongly typed languages is that they improve the automation of error detection in the code. It also helps people understand other people's code, specifically since documentation and sensible variable names cannot be enforced by a language: when you can look up the exact type of a variable, that alone may offer a hint what it is used for. Type information is the only part of code documentation that can be enforced through a language! If documentation is important to you, then you want strong typing!
5) Neither number formats nor definitions of formats are truly universal. You have to accept that anything relating to format either must be defined specifically, or will deliver different reults in different locations.
6) That is a direct conflict with 2: you can't dynamically create new types in a compiled language. That said, your example describes an entirely different situation: that your program can deal with an arbitrary external object. Short answer: impossible. Long answer: Hollywood lies! No you can't interface Alien Computer hardware with a run-off-the-mill lapktop! Not even if you're Jeff Goldblum!
|
|
|
|
|
Something is wrong if you're spending 6 months chasing "==" for "=". With the debuggers/IDEs of today I find chasing them (no, they never go away [someone elses code]) to be fairly efficient.
As for the rest, well, it's the same old programmer-preference thing. No one thing or set of things will satisfy everyone. I believe Abe Lincoln said that. Personally, I really like braces vs. BEGIN/END. Any anyone who feels the need for "// end of some-block" has written a block that is too long; just break it out into smaller chunks/methods/functions.
|
|
|
|
|
The bug was embedded deep within an error recovery routine that got invoked maybe once every 2-3 weeks with the result that the system would crash with little evidence as to why. It had been written by a programmer who had moved on to the next project.
|
|
|
|
|
Sorry. I was harsh. However, a decent language such as my current favorite, C#, almost always catches such things. Eg,
int i = 9;
int j = 10;
if (i = j)
{
DoSomething();
}
... won't compile.
I've been writing code since '81. I cannot find anything to complain about with C#. EVERY other language I've used, not so.
|
|
|
|
|
Sounds good to me.
I have to admit skepticism, though. Even well design systems can be derailed by idiots (or by intelligent noncompliance), or otherwise "gamed" to work against itself. I see it all the time in every human system I encounter.
Figure out how to address that factor in the design, and you've got something.
</soapbox>
I used to call it "Super Happy No-Pants Wonder Day"! It turns out that the police just call it "Tuesday". Go figure...
|
|
|
|
|
I have been in the field for 40 years and have worked fluently in over 12 different languages and their off-shoots including PROLOG.
Hands down, the two best languages I have worked with have always been BASIC and Pascal. However, for ease of use and capability you cannot beat BASIC.
There is no need for a new language since nothing new will be able to do anything better than the existing language stalwarts... At least not until a completely new architecture is available for development.
Steve Naidamast
Black Falcon Software, Inc.
blackfalconsoftware@ix.netcom.com
|
|
|
|
|
I've been working on this for a while.
First, you may have noticed that all the innovation in software and languages is just really continuous re-invention of minor variations in existing languages and language paradigms. The "new" language is just another language with a not particularly well thought out hodgepodge of features that the author would like to see together in a language. There is no real innovation taking place in software languages today. I've been looking at PhD programs in CS and there's not really any real good movement towards the next generation software environment. Which is unfortunate. Thus, I am working on it.
Why is there no forward movement in software? That I need to explain in my Software Innovation Psychology Theory which I am working on right now to produce first a concise booklet, an eBook, and then a video. In a nutshell, it is cause by people mistaking copycat innovation with true innovation (which is very rare). There are also a number of visualization and cognitive factors as well. And also the type of work in software does not really attract true innovators since most of the work is really grunt code work. So there are reasons why the current stasis exists.
Now, on to what a next generation programming language will include/be like/encompass:
1. True Object based instead of just Object "oriented".
2. Combines database, software, and transport protocol into one. There will be no impedance mismatch, no dedicated conventional database servers as such, etc.
3. Definition based rather than procedural based.
4. Smart components instead of dumb controls.
5. Replacement of the conventional function argument passing mechanisms with a definition language based approach. This will eliminate function overloading and re-implement dynamic polymorphism and class overriding in more natural approach.
6. The new definition language will be expressible in both terse and verbose modes. Verbose mode is a very human readable (yeah!) while terse mode can be used to save space and bandwidth when necessary.
7. SQL will no longer be necessary. It will be replaced by a universal data definition language that brings software and data persistence together into one unity.
8. XML will be replaced by a human readable data definition form and format. I've built successful prototypes on this and am converting all of my current code to run with it. Fully human readable and writable. BTXML - Better Than XML!
9. The definition scripting language will not need to be compiled although it could be. It's real use is to connect various services together with smart components to easily create highly functional software without convention programming. This will eliminate many grunt coding jobs but, hey, we have much better things to do in life than wrestle with primitive coding constructs and paradigms all day.
10. This software paradigm will implicitly support fast evolving and AI type software. Security will need to be built in inherently so as to prevent self-mutating virus like software. Please note that the next evolution to AI will require self-modifying, adapting, and evolving code. So this approach needs to be done. One will just have to safeguard against evil intent.
11. Self-Building and self-adapting software will be the preferred approach for GUIs, database programs, and application systems. An advanced user or business analyst will just start up a GUI program and then add and modify smart components to define the GUI interface, its operations, and functionality. No conventional development environment or coding. Modify and build the program as you go. No ORMs, Visual Studio, Iron Speed, etc. The new program is generated/mutated from an existing base object program. Change it as you want when you want. Lock it down so regular users can't mutate or change it. But use an articulated data model so users can easily add their own notes and custom meta data to it for their own use (thus eliminating one of the sources of frequent changes and problems in the existing software development paradigm). Then, if the change is judged good for the base program definition it can be added by the administrator and the change/improvement then becomes available to all, automatically. No more having to continually change and mutate GUIs and database models to accommodate more fields and data.
12. Advanced Hierarchical Data Types. True, object based data types instead of the static and mismatched data types that we now have for programming, databases, and operating systems.
13. Once this is built then re-build the Windows desktop into a better, portable, more human-centric workplace that dynamically helps people work on their projects on the computer instead of presenting just a static cluttered grouping of icons.
14. Now leverage all of this and finally build a true next generation operating system. Replace Windows once and forever with something much, much better. Break the stranglehold of the big companies who really don't have any good idea on how to get to the next generation software or operating system. Change software into something truly dynamic and human oriented. People will smile with the software instead of swearing at it every day. We eliminate the current dead end of software that we are now currently in.
And thus, a new day of the next generation software will be born.
I'm working on all of this and leveraging the existing .NET environment, tools, and paradigm to get there as best as be done with them. While not an optimal approach, I do not have the time and manpower to re-implement everything from scratch so I have to do it this way. This way will have the benefit of providing an intrinsic evolutionary migration path to the next generation software with and by using existing software development environments, databases, etc. Not optimal but it's very doable and it will work as a gradual introduction of this new technology.
And finally I, and you, will have a decent software environment to live and work and play in. Something good for our children.
Currently, I am slowing developing the above pieces of this since it is just me working on this. I could use some help. It's a radically different paradigm than the current one so you'd have to adapt to new paradigms for this. I am currently looking for a good school where I could do my PhD on this and give birth to this, perhaps on a staged release basis. The challenge for finding this school/environment is that it must be supportive of these new paradigms and not burden me with required classes which are not helpful for this (mostly a waste of time for this). This is known as a traditional research PhD and US schools don't support this any longer. I've found a few good foreign schools which allow full research PhD's without classes. Currently I am investigating schools in New Zealand which match this criteria, where PhD's can be completed in a minimum of 2 years, and have very nice and friendly people I am told. I plan to visit there later this year and complete my evaluation. If you have suggestions of good PhD program please let me know. Oh, it must be one where the intellectual property I create is not exclusively owned and controlled by the school. New Zealand schools don't require this.
And if you have constructive input on all or any of the above please let me know.
Thanks for reading/listening.
- Cary Grant Anderson
|
|
|
|
|
Thanks.
C Grant Anderson wrote: People will smile with the software instead of swearing at it every day. We eliminate the current dead end of software that we are now currently in.
This is the kind of thinking I'm looking for.
|
|
|
|
|
Except for the interpreted part, it sounds like C/C++, but you need to use a modern compiler that whines about things like assignments in ifs (or maybe do a lint pass) and a modern IDE for it.
We can program with only 1's, but if all you've got are zeros, you've got nothing.
|
|
|
|
|
Whenever I read one of these "desires to fix programming languages", I laugh. I have been programming since the 80's and I too went through that phase right after college.
However, I never had to work with all these silly pseudo-languages that come and go. We used ASM and C. Then Byorn Stroustroup (?) comes along and says, "hey, I hate programming, I'll add a bunch of junk to keep myself from making mistakes." I would've suggested he find a new line of work instead. C++ is a mess. It's poorly conceived, coerced and unnatural. It does nothing that a professional programmer can't accomplish in plain old C. As is usually the case, it causes more problems than it fixes, or it fixes one set but creates another set.
Considering that most of the world is embedded micro-controllers, those of us who program them don't have gigabytes of memory or gigahertz processors as we need to be more efficient. Over 20 years this has taught me to appreciate C and ASM more. I'm glad I never got my wishes to have a bullet-proof language.
I suggest if you're having issue with a particular part of a language, create a preprocessor directive and use it!
For example, if your problem is:
if (x = y)
this can be fixed by defining:
#define IS_EQUAL ==
then used everywhere as:
if (x IS_EQUAL y)
No need to suggest the world change, or hope someday this 'gets fixed' for you. The C preprocessor is probably the most overlooked part of C. You can easily invent an entirely new language using the preprocessor.
In fact, Linus Torvalds, who is a pretty awful programmer, took to using the preprocessor in ways most professionals would recommend against. But he recognized that it could keep him from repeating certain mistakes he tended to make.
|
|
|
|
|
|
Indeed, SmallTalk ! I suspect many of the newly-minted prophets-with-visions on this thread would gasp if they knew what SmallTalk was capable of in 1968, and what software development tools were like at Xerox PARC at that time.
Of course, the expen$ive hardware needed to run SmallTalk was not available to mere mortals.
“I'm an artist: it's self evident that word implies looking for something all the time without ever finding it in full. It is the opposite of saying : ‘I know all about it. I've already found it.’
As far as I'm concerned, the word means: ‘I am looking. I am hunting for it. I am deeply involved.’” Vincent Van Gogh
|
|
|
|
|
rjmoses wrote: trace their origins back to the days when terseness was a desirable quality.
First, compilers (of which interpreters are just a subset) have deterministic requirements that cannot and should not be circumvented. Thus certain language constructs exist to insure that there is no ambiguity. And this is a feature of compilers (specifically compiler theory) and not just some misunderstanding by the author of the language.
Second, terseness serves another need in that communications requires one to transfers thoughts to the computer. Increasing the verbosity would decrease the rate at which that can occur.
Third one must be aware that no language can be perfect and no user of that language can be perfect either thus the compiler must strive to report errors to the best of its ability. At least in my experience doing that is one of the hardest parts of writing a compiler.
Fourth languages are meant to serve different purposes and no one language can meet the needs of all possible uses without adding complexity that circumvents the original desire for simplicity.
rjmoses wrote: Among other things, a New Programming Language should:
There are a large number new programming languages created every year and presumably many start with the idea that they are going to be 'better' than what already exists.
Many, many, fail to achieve that goal. So many that one can bet that not even one language introduced within one year will ever achieve anymore than a very, very small niche (even that is due to promotion by the author rather than acceptance.)
But you could venture forth into that realm yourself. However, if you haven't ever done so or haven't done so recently, you might want to learn a little about compiler theory first. It helps.
|
|
|
|
|
Very eloquently said, Sir !
“I'm an artist: it's self evident that word implies looking for something all the time without ever finding it in full. It is the opposite of saying : ‘I know all about it. I've already found it.’
As far as I'm concerned, the word means: ‘I am looking. I am hunting for it. I am deeply involved.’” Vincent Van Gogh
|
|
|
|
|
It's time to scratch all other languages and just leave C++ alone.
Honestly, I used to write in many diff languages - about 18 of them. And you know what? I got tired. Every few months there is new, "latest and greatest" mumbo-jumbo that employers jump onto - hey, look, new buzzword. And poor programmers have to "learn", i.e. stuff into their heads that "new" APIs, new language things - just to have them to disappear in another few months for another mumbo-jumbo.
Enough for me. I don't want to waste my life permanently studing things that will gone few months down the road. And, even if they stay - sorry, no.
I chose C++, get great at it, and keep it that way.
|
|
|
|
|
I agree wholeheartedly with your sentiment about perversely curt languages.
1) Your 'FORTRAN' = example is highly flawed.
It would read: IF (X.EQ.Y) ...
No assignment confusion at all.
2) VB.NET is the answer to most of your woes.
Not C#, as it suffers far too much from the legacy of the dreadful C & C++ abortions.
|
|
|
|
|
Sounds like you want something like VB for the dynamic if you want and begin/end instead of curlies. Or perhaps Ada - though it's a lot similar to Pascal - only much more pedantic.
The trouble with the is/as/whatever "words" instead of operators - they can be very ambiguous. Especially when used as an equality comparer.
About the == for equality and = for assignment ... I'm with you. I think that might have been the worst choice in C bar none. In this case I prefer the Pascal-like := assignment and the = for equality, only slightly better. But there are languages which figure out that = is used inside a condition and thus uses its equality override, while in other cases it's an assignment. So obviously it must be possible - just that C (and its progeny) has effectively removed that possibility from their syntax.
Personally though, I don't mind characters too much. As long as they're as consistent as possible I'm fine with having a decent editor which matches them for me (indents / auto-close / etc.). It's when the "vocabulary" of these punctuation marks becomes huge with various "grammatical" rules where it becomes a pain in the @$$. Actually I hated having to type out the begin/end every single time when working in Pascal/Delphi, at least with VB some of it's automaticaly done from the IDE. But I still prefer the absolute consistency of Lisp over all other languages - everything is simply a function call, and you type it in that way too (no need to learn all sorts of different combinations for different aspects).
|
|
|
|
|
EBay has asked users to change their passwords following a cyberattack that compromised one of its databases.
That has got to hurt the ol' pride glands.
|
|
|
|
|
So depressing. Every week there's a new hack or leak from a major website. Ready for this to end!
|
|
|
|
|
Why should I use anything other than ASP.Net? "Less typing" is NOT an acceptable answer. What tangible benefits are realized by going with an alternative view engine? Since they all have to essentially provide the same functionality, I don't see the value of picking one over another.
I know - Razor is used a lot. But why? What makes it better?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
John Simmons / outlaw programmer wrote: But why? What makes it better?
Keep in mind I'm more of a Unix guy over the web, and I've only done like one Razor project a while back...
Less typing means less room for error and cleaner code that's much easier to maintain. New constructs that make life easier, like a lambda, that has minimal penalty on performance are awesome. But, performance is king, that's why I'll never bother with something like Ruby, over the web at least. No amount of syntactic sugar can make up for slow.
Jeremy Falcon
|
|
|
|
|
MVC View Engine is:
1. Light weight
2. Separation Of concern using Model.
3. UI Injection Or View Injection
Life is all about share and care...
public class Life : ICareable,IShareable
{
// implements yours...
}
modified 22-May-14 0:19am.
|
|
|
|
|
And how that connected to the question?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Quote: Why should I use anything other than ASP.Net? "Less typing" is NOT an acceptable answer
That's why...
Life is all about share and care...
public class Life : ICareable,IShareable
{
// implements yours...
}
|
|
|
|
|