Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. codesections (codesections@fosstodon.org)'s status on Wednesday, 17-Jul-2019 23:20:05 EDT codesections codesections

    What's type of strings do you think is best? Why?

    (related: https://www.joelonsoftware.com/2001/12/11/back-to-basics/)

    [ ] C style (null terminated)
    [ ] Pascal (length prefixed)
    [ ] Rust (length metadata)
    [ ] Other (reply w/ details!)

    In conversation Wednesday, 17-Jul-2019 23:20:05 EDT from fosstodon.org permalink

    Attachments

    1. File without filename could not get a thumbnail source.
      Back to Basics
      By Joel Spolsky from Joel on Software
      Back to Basics
    1. Daniel Taylor (randomdamage@mastodon.technology)'s status on Wednesday, 17-Jul-2019 23:32:17 EDT Daniel Taylor Daniel Taylor
      in reply to

      @codesections I'm honestly torn, but Pascal style is also SQL style, and it does have distinct advantages over null terminated.

      It allows optimizations and checks that null terminated doesn't, and also allows you to prevent string buffer overflows by the simple expedient of *stopping the read when you hit the length of the buffer*.

      In conversation Wednesday, 17-Jul-2019 23:32:17 EDT from mastodon.technology permalink
    2. tomasino (tomasino@mastodon.sdf.org)'s status on Thursday, 18-Jul-2019 03:13:19 EDT tomasino tomasino
      in reply to

      @codesections hmm, what about the 9 string varieties in Ada? Fixed, bounded, and unbounded versions of character, wide, and wide_wide. Right tool available for the right job

      In conversation Thursday, 18-Jul-2019 03:13:19 EDT from mastodon.sdf.org permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.