I was wondering if there are any studies that compare golang with C/C++ regarding initial development speed. Has anyone studies this subject? Has anyone implemented a component with both languages and compared the development speeds?
By “development speed” to you mean how fast a competent programmer can use a language and write real programs?
Yes but in comparison with C or C++. Same developer, same functionality different languages.
I know no such studies.
In general, Go is considered to by an easy language to learn. The tooling is comprehensive, the community is vibrant, the library and framework ecosystem is huge.
All this can make an average programmer more productive than using other languages. But, as always, it depends on the circumstances.
Welcome to Golang community!
I can only provide my experience as data point, not a research. I was a Java --> C & Python --> Ruby --> Go developer. However, it can be subjective and bias depending where you come from.
My data has 2 assumptions, developer already mastered and used:
- hardware IO, memory management, and concurrency.
NOTE: These points are not in sequenced, and the quantity does not means anything.
From C to Go
Took me ~15 mins to build a CLI interfacing binary and run on local machine from scratch.
- Has in-box code auditing tools like
go fmt to scrutinize your codes.
- Has powerful linter like
golangci-lint that drills through your codes for smelly codes detection.
- No longer need to do variable counting in functions.
- No longer need to manually manage memory (as in
- Concurrency can be done easily without external library.
- Quite easy and simple to setup Go development environment.
- No longer depends on logging due to easy unit-testing.
- in-box unit test tool has a heat-map code coverage tool to pinpoint your test codes.
- Struggle to operate in non-operating system environment due to reliance of garbage collection (e.g kernel / bootloader / microcontroller).
- Has cGo that interpolates between C-Go but breaks the Go’s “house rules”.
From Go to C (Speculation based on experience)
Will take more than 2 hours to build the same CLI interfacing binary and run on local machine from scratch.
- Need specialized tools like Valgrind to detect memory leak issues.
- Need blackduck software to scan through legal risk codes.
- Need strict memory counting practices to manage memory.
- Need strict code reviews from a C/C++ expert.
- Need specialized tool for running unit-test OR just GDB/KGDB through your program.
- Need a security session to purge C & C++ vulnerabiltiy from codes like possible stack overflow, buffer overflow, memory leak, etc.
- You have a SOP for setting up your C development environment.
- Multi-level logging is vital.
- No heat map code coverage for test tools.
Between C++ and Go
I picked Go mainly because of its learning curve is low coming from a C developer who practiced Linux Kernel coding style. It is almost directly compatible. I took me like 2 hours to get up to speed.
I always get an impression that C++ is similar to Java, where it is a heavy battery language to build sophisticated products. Therefore it takes time (I expect min 4 weeks to be as a junior developer).
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.