Working with different programming languages allows you to compare certain features between them. Convergence between languages, (and also frameworks) becomes noticeable: It seems new language- and framework features are âborrowedâ from other language- or frameworks, or are sometimes the result of âtaking the best of both worldsâ. Multi-value returnâŚ
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
â Live Streamingâ Interactive Chatâ Private Showsâ HD Quality
Anya is LIVE right now
FREE
Free to watch ⢠No registration required ⢠HD streaming
Swift and the principle of Maximal Surprise (part I)
These days Iâve taken upon myself to do some Swift code review for one of my students, even if I personally donât write Swift. My idea was that after you know several programming languages, it should be easy to read yet another one.
Swift, on the other hand, has a bunch of surprising features up itâs sleeve. Iâve marked this post with (part I) because I plan to come back with some more examples when Iâll find more time.
One surprising feature is the keyword convenience which specifies that a constructor is not the main constructor, but instead:
Convenience initializers are secondary, supporting initializers for a class. You can define a convenience initializer to call a designated initializer from the same class as the convenience initializer with some of the designated initializerâs parameters set to default values. You can also define a convenience initializer to create an instance of that class for a specific use case or input value type.
I keep wondering: is this aspect such an important information that one should have a keyword in the language for it?
A recent project had me looking for cheap micro-controllers that are supported by a particular industrial automation platform. As part of this, I found that the most readily available micro-controller runs on 16-bit DOS and the last supported compiler is more than a decade old, so it carries this disclaimer:
The Software was not designed to operate after December 31, 1999. It may be incomplete and it may not function properly.
This just blew me away. Itâs one thing to work with experimental software thatâs still in development, but itâs another to start a new project with something that has been out of service for more than 15 years! The only other commercial compiler that advertised support for this platform wasnât even available upon request; the sales rep was just astonished that I wasnât looking to do âmodern app developmentâ. I asked if or where the compiler was available online and never got a call back! Luckily for my sanity, the project didnât get far off the ground after these discoveries. I only got a little way through finding the gritty details of what part of the compiler was really required. The hardware specs for the test platform didnât meet some of the smoke test requirements for our application without some serious compromises.
This experience of finding an abandoned, but still required platform got me thinking about other legacy systems and how and why they can stay relevant. I guess this shouldnât surprise me too much, as I worked on OpenVMS as my primary development platform for almost 2 years. That OS doesnât even hold a candle to having a micro-controller platform move to iPhone development and drop their compilerâs interrupt extension. The relevance argument is that there are plenty of technologies from that same age that donât have any connections to development today. Any technology thatâs managed to stick around that long must have been pretty amazing when it first came out!
I understand some of the business cases that keep legacy products supported and how much time it can take to migrate once all of the systems assume a certain platform. But my focus on the new and shiny has always blinded me towards the many, many legacy technologies that are not just a common but often thriving platform. For every few developers working on building the next wave of technologies, there are many more with the burden of maintaining the technologies of past generations. All of that momentum from the last wave takes a very long time to die out, specifically if it has a commercial backing. Supporting infrastructure and platform technologies generally donât go bust as fast as they boom, leaving a long tail of technologies on their way out that often have a much higher âwork shareâ than the technologies that are still pushing for their first wave of adoption.
Delphi
If I had to pick a poster child for this, Object Pascal would cover all of the bases. Itâs not a new ecosystem, but it still manages to hold onto some serious mind-share. My favorite is itâs hype of RAD (Rapid Application Development). Today, this isnât a common term for describing upcoming or recent technologies, but at one point in Delphiâs life-cycle it must have been an important acronym to showcase. It originally meant that the language ecosystem has tools for building GUI applications. What a joke! Now anyone can write some bindings to a widget toolkit for iterative, GUI-driven development. The term has completely lost itâs relevance as other ecosystems (mostly web) have advanced much further in that space, and now the term only serves to identify âenterpriseâ or aging technologies.
As an aside, just the abbreviation led me down another hole of finding all of the silly three letter acronyms that were once so popular for every hot technology. Although I honestly canât say that the absurdly named technologies today (thereâs are databases named Rocks and Cockroach) have done any better at communicating their intent or application domain.
The âoutdatedâ nature of the technologyâs marketing has no impact on itâs original or ongoing technical merits. Delphi hasnât completely fallen out of favor or only survives for a very small niche. Itâs re-branded itself as a cross-platform mobile development ecosystem and remains in the top 50 most popular languages by most rankings. Reading some of of the language recent features and tool chains, I couldnât find any compelling arguments to use it over any other, newer platform for the exact tasks of GUI application development. It looks like Delphi has stuck around not on itâs innovative feature releases and cutting edge tools, but on the consistency of itâs developer base to solve common and ongoing problems with the knowledge they have from learning Pascal 20 years ago.
No one should start their first new project or business in Delphi today, but there are plenty of developers who will have to learn it so that they can maintain and enhance existing projects and then probably on their next project because they became so familiar with its strengths and weaknesses. Itâs still a powerful language like many others that can still âget shit doneâ. And thatâs really the minimum that a language can offer to stick around.
Cold Tools
There are plenty of technologies like Pascal that I wouldnât consider serious contenders for the best tools to solve modern problems. Most of these legacy tool-chains had a large user base from many decades ago when they were serious contenders or cutting edge. The developers or executives then chose to never move to a newer or better platform. Itâs very disheartening to hear that many programmers are in this time warp where old technologies are still causing old problems in modern systems. This is the classic âlegacyâ problem most developers have encountered. They know that their current tools are old and broken, but they donât have other options.
Another aside, I read the MUMPS post on the Daily WTF after I started writing this, found on accident from a podcast arguing about the âdeath/stagnationâ of Ruby. The Wikipedia talk page is hilarious. Itâs clear that some readers went overboard to smear the language on an older version of the page, but then MUMPS developers attempt to post some defenses of the language! Itâs one thing to understand and accept that youâre stuck using an inferior and antiquated technology and make the most of it, but itâs another to attempt to trumpet the language as a modern or elegant solution in the face of vastly more well established alternatives.
Being held back by technology can have a massive detrimental impact on developers who donât take the time to look up at what they could be missing (The blub problem). I recall a recent C++ presentation about what was supposed to be a hardcore debugging story and I was expecting to hear something like: âthe chip-set had a bug that only appeared while using the highest memory frequency and the CD-rom tray togetherâ or âthe JIT compiler output bad optimization code for certain loopsâ. But instead I heard that an application developer found and reported a strange rendering bug that affected some draw logic in a 1st party widget toolkit and then had to wait multiple years for a fix because the toolkit was closed source and poorly supported. :(
Anti-Hype
The anti-hype train just heads the other direction of the hype train, where developers are just expected to complain about these technologies for just being old, or being bad at something that no longer matters. This isnât on the same track as the legacy train to nowhere, but sometimes they cross over.
Before ranting, know that I still respect the technologies (and their practitioners) for what they were and I know they were generally kept within reasonable bounds. I know that I'm not going to have to debug and enhance a web application written in Fortran, or that any recent flight control system written in Ada had to have been done with someone with 25 years experience.
But Iâm always impressed when I hear about an old technology thatâs still seriously kicking mostly because developers canât pick alternatives without massive switching cost or because their part of the technology stack hasnât moved as fast as the web development world. Mention or use of these languages or terms are generally red flags to me that the technology or user is far behind cutting edge in programming technologies for one reason or another.
Fortran
Oracle
Delphi & Pascal
Visual Basic 6
GWT
Perl
SOAP
MFC
Sourceforge
J#/J++/JScript
FoxPro
ActionScript & Flash
Corba
Solaris
Symbian
Itantium
Iâm not listing just old or abandoned technologies, some of these are still industry giants, and others probably wonât ever disappear completely even when there are much better tools for the job. Iâm not even listing hate magnets like PHP or ObjC. These are the tools that âshouldâ have been âreplacedâ for new projects, there shouldnât be a compelling technical reason to use these over something else, even if itâs the same age with a worse feature set. The fact that itâs better supported should be enough to justify phasing out these âknown deficientâ technologies in favor of something that is at least more popular with a better chance at a future. Picking a popular technology at least gives some chance of a later migration, as you can stay in a safe herd for other newer technologies to cater to your migration pains. (again ala C to C++)
Relativity
On the other side of this hype, Iâve been talking to quite a few programmers who donât follow all the stupid HN hype of the new technologies and found that they donât have the same perspective as me of what is new and what is aging into irrelevance. Iâve heard that Lisp was âold and vileâ or âmath based and slowâ. That Lisp was only used for âteaching the evolution of languages since thenâ. Iâve heard how Visual Basic .Net is important and that itâs âreally powerfulâ in comparison to other languages. Iâve recently talked about Ruby on Rails multiple times because everyone wants to learn it as their first web development framework because itâs âhotâ and âeveryone is using it to use it so jobs are going to growâ. My options and observations are completed opposed to all of the above. So every time something like that happens, it helps me understand how someone would suggest learning Pascal or Ada at this day in age on Quora with their real name. The definition of âgoodâ and âbadâ just arenât widely defined for programming languages. Itâs one thing to say âthis language is too conservative, weak dynamic typing helps me build fasterâ or âThis system canât have run-time errors or inefficiencyâ, but itâs another to say that one particularly flawed tool is worthwhile while others can be demonstrability superior.
There are plenty of old technologies that are still hot today as theyâve grown with their niche to spawn and support the cutting edges of technology in different ways. Out of use technologies can still be considered warm if they have descendants or significant influence on modern technologies. The technologies above are either generally recognized as dead ends (in some communities at least) or treated as important stepping stones that have now far outlived their original usefulness.
But even longer would be the list of technologies Iâd consider hot or warm that havenât had half the recorded adoption of any one of the legacy technologies listed above. My perspective is so warped towards the new that Iâd see a small framework take much more mind-share than it actually has in comparison to a well established stack. This is the gap between the early adopters and the mass adoption. So many new and improved technologies are proposed that never make it to the gap and still more fail to make the jump into mainstream popularity. But once that jump has been made, itâs near impossible to kill it. It will go on living long after support has ended and other tools are available that are 10x or more productive. Or even worse is that the jump forward was imaginary, and that the ânewerâ technology is actually a step backwards for productivity!
The long tail of technologies says something about how future technological progress will unfold. Weâll reach a certain point where some of these dinosaur technologies will indeed go extinct while they are still in use behind the scenes. They will continue to drag down their associated domains until they can be replaced, sapping energy that could have been used to actually improve the application. And normally, by the time they get around to being replaced, they wonât be replaced by a new or forward thinking technology for the same reason it took forever to replace it. The application will be moved to an equally well explored dead-end that has an even shorter lease on life than the last platform. Which will cause the problems of the application to repeat even faster!
This sort of technological burden, the whiplash from the explosion of system choice, wonât have as noticeable effect as bridges collapsing from disrepair and outdated materials, but it will slow down future advancement as once trustworthy infrastructure takes more effort to maintain as itâs pushed towards necessary goals that other technology has long surpassed. Iâve heard arguments that call for a Cambrian explosion of languages and tools that will hopefully provide an evolutionary path out of this repetitive mess, but if done incorrectly this sort of effort could lead instead to a very painful mass extinction!
The topic of legacy code is massive. Even trying to condense a single question of âwhyâ, âhowâ, or âwhatâ becomes a complex multi-page post!
Every technology eventually leaves a legacy, but where it gets on that train and how far it runs is a much more complicated function of developer preferences and happenstance. The problem with using any technology is that all technology keeps moving. As soon as you put a foot down to do something with the tools of today, the world will start passing you by. Youâll either need to run with the updates to keep up, push the cutting edge yourself, or hope that when the platform slows down it sticks around log enough where you donât need to worry too much about catching up!
How-to: Function overloading by return type? #computers #dev #programming
How-to: Function overloading by return type? #computers #dev #programming
Function overloading by return type?
Why donât more mainstream statically typed languages support function/method overloading by return type? I canât think of any that do. It seems no less useful or reasonable than supporting overload by parameter type. How come itâs so much less popular?
Answer [by Greg Hewgill]: Function overloading by return type?
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
â Live Streamingâ Interactive Chatâ Private Showsâ HD Quality
Anya is LIVE right now
FREE
Free to watch ⢠No registration required ⢠HD streaming
Fixed: Best explanation for languages without null #computers #development #fix
Fixed: Best explanation for languages without null #computers #development #fix
Best explanation for languages without null
Every so often when programmers are complaining about null errors/exceptions someone asks what we do without null.
I have some basic idea of the coolness of option types, but I donât have the knowledge or languages skill to best express it. What is a greatexplanation of the following written in a way approachable to the average programmer that we couldâŚ
Fixed What are important languages to learn to understand different approaches and concepts? #dev #it #asnwer
Fixed What are important languages to learn to understand different approaches and concepts? #dev #it #asnwer
What are important languages to learn to understand different approaches and concepts?
When all you have is a pair of bolt cutters and a bottle of vodka, everything looks like the lock on the door of Wolf Blitzerâs boathouse. (Replace that with a hammer and a nail if you donât read xkcd)
I currently program Clojure, Python, Java and PHP, so I am familiar with the C and LISP syntax as well as theâŚ