Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Aiono
Aiono
@aiono@mastodon.social  ·  activity timestamp 2 days ago

Apparently Claude's C "compiler" is actually Python compiler since it allows returning a string from a function with a return type int. They should add this in the new C standard /s https://godbolt.org/z/of4nxj79c

#compiler #vibecoding #agenticcoding

Compiler Explorer - C (CCC (trunk))

/* Type your code here, or load an example. */ int main() { return ""; }
  • Copy link
  • Flag this post
  • Block
Aiono
Aiono
@aiono@mastodon.social replied  ·  activity timestamp 2 days ago

You may think it's just implicitly converted from a pointer to an integer, but it allows returning anything such as a struct from a function with int return type.

  • Copy link
  • Flag this comment
  • Block
Gabriele Svelto
Gabriele Svelto
@gabrielesvelto@mas.to replied  ·  activity timestamp 2 days ago

@aiono duck typed C is the best C

  • Copy link
  • Flag this comment
  • Block
Aiono
Aiono
@aiono@mastodon.social replied  ·  activity timestamp 2 days ago

@gabrielesvelto Your comment reminded me that the predecessor of C was in fact duck typed https://en.wikipedia.org/wiki/B_(programming_language)

B (programming language) - Wikipedia

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct