Can most compilers check for errors? [closed]

I am a beginner at programming; so far all the compilers I have used can check for errors, and can refer to the line with the error. Are there any compilers, maybe for a certain language, that do not do this? at least at the professional level? The error-checking is great.

3

The answer is yes and no.

Yes, compilers will report locations with errors

A compiler stores a piece of data that represents the program you wrote. Remember, a compiler isn’t magical it’s just another program working just like the one you wrote! This piece of data will “tag” the relevant areas of code with locations. During compilation if the compiler encounters an error it’s very easy to spit out the tagged location and so pretty much all of them do.

If your program does really crazy things, like generate code or let the compiler infer and generate parts of your program then sometimes the line numbers are utterly useless, but they’re still there!

In fact, compilers usually give a lot more than just the line number. They try to tell you what exactly went wrong and why it happened. How successful they are varies a lot. A compiler that I worked with for example would occasionally just barf

Error:some line: internal failure

It’s error handling algorithms were a bit dodgy to say the least. Most are very good though.

No, Not every language gets as much error checking

This is actually somewhat of a religious war in the programming world. How much checking should your compiler do? A compiler can’t magically detect all errors, so really it just forces you to follow a bunch of rules it decides upon. The goal is that these rule limit you to writing “good” programs. The problem is those rules will always cut out a bunch of perfectly reasonable programs!

Some software developers want their compilers to back off and just let them deal with making their programs correct. This means it’s easier to write a legal program, but you have to work a lot harder to ensure it’s correct.

Some software developers want their compilers to check as much as possible. They have to work a lot harder to write the original program so that it follows all the rules of the compiler. Once it compiles though, they don’t have to test as much (if at all) because the compiler checked a lot of things before hand.

Deciding where on this spectrum you end up takes time. A lot of time. It also takes you experimenting with different languages to figure out what you want from a compiler. A lot of people even change their minds as time goes on. However, you can find professionals pretty much all along the spectrum.

TLDR

Yes, all compilers will give you information about your error. What errors compilers catch though varies a great deal.

3

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Can most compilers check for errors? [closed]

I am a beginner at programming; so far all the compilers I have used can check for errors, and can refer to the line with the error. Are there any compilers, maybe for a certain language, that do not do this? at least at the professional level? The error-checking is great.

3

The answer is yes and no.

Yes, compilers will report locations with errors

A compiler stores a piece of data that represents the program you wrote. Remember, a compiler isn’t magical it’s just another program working just like the one you wrote! This piece of data will “tag” the relevant areas of code with locations. During compilation if the compiler encounters an error it’s very easy to spit out the tagged location and so pretty much all of them do.

If your program does really crazy things, like generate code or let the compiler infer and generate parts of your program then sometimes the line numbers are utterly useless, but they’re still there!

In fact, compilers usually give a lot more than just the line number. They try to tell you what exactly went wrong and why it happened. How successful they are varies a lot. A compiler that I worked with for example would occasionally just barf

Error:some line: internal failure

It’s error handling algorithms were a bit dodgy to say the least. Most are very good though.

No, Not every language gets as much error checking

This is actually somewhat of a religious war in the programming world. How much checking should your compiler do? A compiler can’t magically detect all errors, so really it just forces you to follow a bunch of rules it decides upon. The goal is that these rule limit you to writing “good” programs. The problem is those rules will always cut out a bunch of perfectly reasonable programs!

Some software developers want their compilers to back off and just let them deal with making their programs correct. This means it’s easier to write a legal program, but you have to work a lot harder to ensure it’s correct.

Some software developers want their compilers to check as much as possible. They have to work a lot harder to write the original program so that it follows all the rules of the compiler. Once it compiles though, they don’t have to test as much (if at all) because the compiler checked a lot of things before hand.

Deciding where on this spectrum you end up takes time. A lot of time. It also takes you experimenting with different languages to figure out what you want from a compiler. A lot of people even change their minds as time goes on. However, you can find professionals pretty much all along the spectrum.

TLDR

Yes, all compilers will give you information about your error. What errors compilers catch though varies a great deal.

3

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật