3,756 karma · joined June 7, 2015
[1]: https://redmonk.com/sogrady/2026/04/14/language-rankings-1-2...
Just out of curiosity, what's holding you back? I'm not trying to evangelize or something, it's more of a personal collection of reasons various people have provided that I have.
https://github.com/golang/go/issues/76920
You might want to follow this proposal, if you aren't already. It's the most recent one, and it's supported by quite a few “core members” of the Go Team. I don't think it'll land in 1.28, but I like the fact that it's still a feature that's being actively discussed.
https://www.nationalgeographic.com/photo-of-the-day/photo/ul...
[1]: https://reactos.org/
Are there any reasons why that is so? Do compilers not reuse the information they gather during compilation for diagnostics? Or is it a deliberate decision?
v := interfaceType(concreteTypeValue)
in Go, what you're actually doing on a lower level is: dataPtr := &concreteTypeValue
typePtr := typeData[concreteType]()
v := interfaceData{
data: dataPtr,
typ: typePtr,
}
The first line here is the allocation, since (at least, the way I recall the rule) in Go pointers never point to values on the stack, so concreteTypeValue must be allocated on the heap. The rule about pointers not pointing to the stack is there to make it easier for goroutine stacks to grow dynamically.[1]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3199.htm.
Edit: Seems to be fake news: https://www.snopes.com/fact-check/anti-sex-beds-2020-olympic....
Unfortunately, searches for “PostgreSQL Tutorial D” don't issue useful results for obvious reasons.
[1]: https://www.dcs.warwick.ac.uk/~hugh/TTM/index.html
[2]: https://www.postgresql.org/docs/current/sql-createtype.html
TYPE
TWeekday = (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,
Sunday);
VAR
WeekdayNameIndex : ARRAY [TWeekday] OF ShortString = ('Mon', 'Tue',
'Wed', 'Thu', 'Fri', 'Sat', 'Sun');
Now `WeekdayNameIndex` is a properly type- and range-checked look-up table.It's really sad that these simple joys of Pascal are still lacking from a lot of mainstream languages.
A thing I've discovered that helps me a lot that don't see mentioned at all is to always review code by checking it out on your machine and using your editor to inspect it. Maybe it's just me, but there is something about seeing the code in your own environment as well as having all of your tools to e.g. see where a method is used helps massively.
[1]: https://duktape.org/
<style type="text/javascript">
tags.H1.color = "red";
tags.p.fontSize = "20pt";
with (tags.H3) {
color = "green";
}
with (tags.H2) {
color = "red";
fontSize = "16pt";
marginTop = "4cm";
}
</style>