Features I Wish English Had

DISCLAIMER: I AM NOT A PROFESSIONAL LINGUIST!

Tonight I had originally planned to write about some abstract programming concept, but it quickly got scrapped when I saw a video by Tom Scott (check him out, he makes some awesome content) detailing features from other languages he wished we had in English. After pondering things I’ve read about various languages and their grammars, I decided this topic was a little more interesting than some of the programming stuff I planned.

Much like the video, I came up with four distinct features I wish English had. Remember that these are features that would be interesting to have, and I realize they wouldn’t actually be practical for real English. Also note that each feature has advantages and disadvantages, and my judgements are purely based on curiosity/interest. These are features in the grammar, writing system and pronunciation:

1. Greater information density in the English writing system.

If you don’t already know, information density is the concept of measuring how much information a sound, written symbol, etc represents. Take the written Japanese word for “dog,” which is represented by the character “犬” (inu). The written Japanese has greater information density, because it takes three written English characters to get the same meaning as one Japanese character. It allows text to be shorter, and if you’ve memorized the writing system well, more convenient to read. Modern technology like Twitter and SMS make the ability to write text with as little characters as possible even more convenient.

People are already trying to make English more convenient with greater information density. For example, popular texting slang shortens “you” to “u,” “because” to “cuz/cus” and so on. Another popular way of doing this is through abbreviations like “lol.”

To have this feature in English, one way think we’d have to adopt something like the Chinese writing system. This gives the impression that information density would make English much more complex. The true reality is something like the Korean writing system would be much better for English. Koreans use a writing system called Hangul, which organizes words into little blocks for each syllable. A Hangul-like system would make English have much greater information density, since each character is a syllable. It would even make English easier to spell/read, since Hangul has proven to be one of the simplest writing systems. There’s even a comic that can teach you Hangul in fifteen minutes!

If you’re interested in Korean Hangul, check out Hangul-English. It’s an attempt to write English using the Hangul writing system, and it was created by a friend of mine!

2. Drop subjects, objects or verbs based on context.

In languages like Japanese or Polish, it is easy to drop elements of a sentence based on context. In many English sentences, it would sound very unnatural to drop a subject, object or verb.

As an example, let’s imagine I’m introducing myself in Japanese to someone on the street:

Watashi wa Kurisu desu.

(私はクリスです。)

This would translate to the complete sentence “I am Chris.” But, because I’m in a context where I’m introducing myself (it’s obvious that the subject is me), I can simply say:

Kurisu desu.

(クリスです。)

This would translate to something like “Am Chris.” But, because of context, somebody who understands Japanese would see this as acceptable.

3. Name suffixes.

In Japanese, name suffixes are extremely common. They’re used to mark another person’s status compared to you. It may sound rude to mark someone with a certain “status,” but most Japanese name suffixes are actually used to make yourself sound politer.

A suffix like -san can be used to refer to another equal human being (for example, you could call me “Chris-san”). Likewise the -chan suffix can be used for the name of anything you find endearing, such as your girlfriend/boyfriend, pet (there’s a dog I call “Benny-chan”) or even inanimate object (sort of like how you might say to a small child, “Mr. Sun is shining today!”).

There are a handful of other Japanese name suffixes. If you want to read about all of them, visit the Wikipedia article.

4. Frequentative verbs.

English has this feature to some extent, but Finnish and other Uralic languages do it best. I owe my discovery of this feature to a Quora question.

As of my observation, frequentative verbs imply you’ve repeated an action with a certain frequency. For example:

  • The Finnish verb juoksen (“I run”) in frequentative form becomes juoksentelen (“I run around (aimlessly)”)
  • The Finnish verb hypin (“I jump”) in frequentative form becomes hyppelen (“I just jump around”)

Pretty fascinating eh?


Conclusion

I hope you learn some cool stuff about languages from this article (I sure did). If you have any other cool features you think would be interesting in English, be sure to leave them in the comments! 🙂

Is Go the C Killer?

I intended to write a post like this long ago as a sort of follow-up in spirit to my old(er) post on C. Unfortunately since I code most of the day my brain is too beat out for writing articles later in the day. I must admit, however, that I am quite lazy when it comes to writing blog posts. Writing a fairly technical blog post takes a lot of effort and research, so it’s not as easy as it may seem. Regardless, I’ve finally got into my blog-post-writing-spirit. 🙂

It seems since my January post there has been a big inflation in Go and Rust users. Some brave souls even call Go a replacement for C when writing more low-level programs. My opinions have certainly changed since my original post on C, and I’ve formed some interesting views on the whole “Go vs C” debate. If you read my original article, you’ll know I claimed C was the best programming language. Although it may have seemed I was trying to prove how C was the absolute best, it was intended to be taken a bit more lightly. I don’t think C is absolutely perfect. It has flaws like every other programming language in existence. Moreover my intention was to say that C was still just as legit as any other language that exists. A lot of people seem to view C as some archaic nightmare used by hackers and code gurus, but it’s not like that. I tried to say that C is still pretty awesome, and stated some reasons for it being awesome. With that off my chest, let’s explore the weird world of the C and Go programming languages!

What is Go?

To say it simply, Go is a language with the low-level capabilities and simplicity of C but with tons of modern programming language features. The language itself was developed inside Google by Robert Griesemer, Rob Pike and Ken Thompson. The people who created Go make it even more interesting. Ken Thompson was the creator of the original B programming langauge, which was a very early compiled language that inspired Dennis Ritchie to create C!

Although Go comes with all the typical features of a modern language (garbage collection, package management, powerful object-oriented features, etc) the syntax resembles that of C and C++. Here is a Hello World program in Go:

package main

import (
    "fmt"
)

func main() {
    fmt.Printf("Hello world, or こんにちは世界!")
}

As you can see, Go has a main function with a Printf function much like C. Unlike C, however, are two of Go’s required statements at the beginning of a program. One is the package statement, which defines what package the program is part of. This is used in Go libraries so you can import each package nicely. The second is the import statement, where a list of packages for the program to use is defined. There are a ton of default Go packages you can import, but Go has unique features like importing packages from GitHub URLs. Go’s Hello World program likes to show off its amazing Unicode support by including a “hello world!” translation in Japanese.

The Go compiler itself compiles code directly to machine code. Unlike languages like Java, Go compiles completely optimized machine code binaries for each platform. Lucky for us, Go supports almost every relevant operating system today. Even operating systems like NetBSD and Plan 9 are supported!

Go’s compiler is itself written in C (I’m guessing Rob Pike, Ken Thompson and co. had a lot of experience writing compilers in C), but the developers are trying to make Go’s compiler self-hosted. A self-hosted compiler is a compiler written in the same language it compiles. In other words, Go’s compiler would be completely written in Go. This is a major step for Go, since it’s the ultimate proof that Go is fast and versatile if it can implement itself.

Will Go Replace C?

It’s hard to tell whether newer low-level languages like Go will replace classic languages like C anytime soon, but I can give a prediction: not anytime in the near future.

Imagine C is a bike and Go is a modern car. Although a car is much more powerful, it completely relies on gasoline. Anyone can power a bike with two working feet. By setting up a full Go environment you can make amazing, easy to read programs, but anyone with a C compiler can create some decent C programs. Even though we have modern cars does that mean we need to stop selling bikes? Of course it doesn’t. Just because we have Go doesn’t mean C is just going to vanish. For goodness sakes, the military is still running on code written in Ada!

That said, we may see a lot more code written in Go. We won’t see stuff like the Linux kernel converted to Go for a long time, so it’s safe to say C isn’t leaving us completely. Whatever happens there’s no need to worry. Sometimes we focus too much on the tools we use to make something rather than what we want to make. Use C or Go, they’re both perfectly relevant languages for the time being.

10 Reasons Why C is Still the Best Programming Language

Programming has changed a lot since the 1960’s, and more so since the 1970’s, but one language has managed to stay the same through thick and thin: C.

When C compilers had gotten into the hands of the common man, things really exploded. At a glance, you may see nothing special about C (you might even say it sucks compared to something like Ruby or Python nowadays), but C is way more powerful than you think. Compared to the current languages of the time like COBOLFORTRAN, or processor-specific Assembly language, C was like programming heaven. Where confusing, system-specific Assembly language once stood, C replaced with a toolkit no programming language today has ever truly remade.

Since C was such an amazing language, here are my top ten reasons C is still the best programming language!

10. C is portable

Before C, programmers had to rely on Assembly. Assembly is no doubt a great language (the creator of Rdio went as far as to say C is like a DSL for Assembly code), but there was one drawback–it was based on system instructions differing between CPUs. This meant that Assembly written for an Apple II didn’t work with assembly for a Commodore 64. When C came along, software meant for an Amiga could be run on a MS-DOS with no, or very little modification!

9. C has a nice syntax

It sounds like an odd thing to say, but C’s syntax is beautiful. C has often been portrayed as the ugly duckling of programming linguistics, but it is a very definitive way to write a language that interacts with the machine at such a low level. Compare it to its predecessor, Assembly, and I’m sure you will find it very clear (this example uses x86-64 Linux Assembly with AT&T syntax):

	.section	.rodata
string:
	.ascii "Hello, world!\n"
length:
	.quad . -string		# Dot = 'here'

	.section	.text
	.globl _start		# Make entry point visible to linker
_start:
	movq $4, %rax		# 4=write
	movq $1, %rbx		# 1=stdout
	movq $string, %rcx
	movq length, %rdx
	int $0x80 		# Call Operating System
	movq %rax, %rbx		# Make program return syscall exit status
	movq $1, %rax		# 1=exit
	int $0x80		# Call System Again

Or in C:

#include <stdio.h>

int main()
{
    printf("Hello, world!\n");
    return 0;
}

Yeah…

8. C has macros

Aside from the occasional LISP, it’s hard to find many programming languages that fully utilize the power of macros nowadays. Languages like RubyPython, or Perl just don’t use them.

This makes me sad. With the flexibility of macros, one can design the language from the language! C macros run through the C preprocessor, which replaces all keywords matching the name of the macro with the specified macro text. This lets you do some crazy things, like creating custom keywords for if-statements:

#include <stdio.h>

// The '#define' preprocessor flag creates a macro.
#define IF_EQ(a, b) (if (a == b))

int main()
{
    char a = 'A';
    char b = 'B';
    IF_EQ(a, b)
    {
        printf("Yay!\n");
    } else
    {
        printf("Boo!\n");
    }

    return 0;
}

In the above program, we define a macro called IF_EQ, taking the two macro arguments (yes, there are function-like macros) a and b. When we use the IF_EQ function in the main C function, the IF_EQ text gets replaced with the if statement text in the macro definition. Thus, our IF_EQ(a, b) becomes replaced with if (a == b) by the time our source is compiled.

7. C has no pre-defined style

Despite its reputation of chat-channel flame wars, the fact that C has no style guide can actually be quite good. In a sense, C teaches you to accept the fact that you’re not the only one coding in the world. Macro naming, function naming, and data structure naming all depends on your preference of style.

6. C is small

Since C is fully based on variables, macros, functions, and structures, there isn’t all that much to it. Due to this, C has been embedded on almost any modern microprocessor, from fridges to alarm clocks. With a bit of hacking, you can embed some C on your Arduino right from home!

5. C never really changes

Ever since Dennis Ritchie invented C over the 70’s, C’s fundamentals have never really changed. It still has functions, structures, and variables exactly how it had them in the original book on C. C code that’s written in these books can still be run perfectly with modern compilers like the GNU C Compiler (GCC) or the LLVM C Compiler (Clang).

4. If you know C, you know C++ and Objective-C

It’s true to say that C is very different from C++ and Objective-C, but from a learning standpoint they all aren’t that far apart. C++ and Objective-C are are simply subsets, or dialects, of the same C language we all know. If you can run C in your C compiler, you can likely run it with little language-specific modification in your C++ or Objective-C compiler. In fact, I highly recommend you learn C (others do too) before you learn Objective-C or C++, since it will introduce you to their core concepts.

3. Know C? You know everything else, too!

Since almost all programming languages nowadays are themselves implemented in C, knowing C basically gives you a free ticket to knowing all programming languages. Of course, C is a procedural language, which means classes and objects are non-existent compared to languages like Python, but Python’s class model itself is written in C. This means that understanding C may not teach you object-oriented programming, but it will teach you how it was conceived, designed, and implemented.

2. C interacts with the computer near the lowest level

Sure, it’s not garbage-collected, memory-leak-free, or simple, but C’s ability to interact with the computer at a level near the memory itself is certainly useful. Before C, you had to use a language like Assembly to control the computer at its heart. Though this was ok for the time, it still meant thousands of complex instructions and routines for programmers to try and understand through a mess of memory management. In the post-C era, you can interact with all the bits and bytes in a safer, more understandable manner.

1. C powers the world

The number one reason C is the best programming language today is still the fact that it simply powers everything. From your phone to your Wii, no other language provides the level of hardware interaction with the practicality of a concise and expressive syntax. Unless you’re still using an early IBM (please switch soon, if so), the screen you’re reading this article on is probably powered by C.

With C, we can forget writing thousands of complex Assembly routines, thousands of processor-specific instructions, and spaghetti like code. Because of C, the CPU, memory, and graphics cards have turned from their messy, low-level pasts into an easier, readable format.


The verdict

As processors advanced, so did the Assembly code running on them. If it wasn’t for good ol’ C, programming a 3GHz processor would be a much greater task than it is today. Because we have C, we can talk to computers easily and effectively. Due to this, I think we should all accept that C is the best programming language possibly ever created.

RIP Dennis Ritchie, creator of C, September 9 1941-October 12 2011.